Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/tegra: add MODULE_DEVICE_TABLEs

When tegra-drm.ko is built as a module, these MODULE_DEVICE_TABLEs allow
the module to be auto-loaded since the module will match the devices
instantiated from device tree.

(Notes for stable: in 3.14+, just git rm any conflicting file, since they
are added in later kernels. For 3.13 and below, manual merging will be
needed)

Cc: <stable@vger.kernel.org>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Stephen Warren and committed by
Thierry Reding
ef70728c 5482d75a

+7
+1
drivers/gpu/drm/tegra/dc.c
··· 1394 1394 /* sentinel */ 1395 1395 } 1396 1396 }; 1397 + MODULE_DEVICE_TABLE(of, tegra_dc_of_match); 1397 1398 1398 1399 static int tegra_dc_parse_dt(struct tegra_dc *dc) 1399 1400 {
+1
drivers/gpu/drm/tegra/dpaux.c
··· 382 382 { .compatible = "nvidia,tegra124-dpaux", }, 383 383 { }, 384 384 }; 385 + MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match); 385 386 386 387 struct platform_driver tegra_dpaux_driver = { 387 388 .driver = {
+1
drivers/gpu/drm/tegra/dsi.c
··· 983 983 { .compatible = "nvidia,tegra114-dsi", }, 984 984 { }, 985 985 }; 986 + MODULE_DEVICE_TABLE(of, tegra_dsi_of_match); 986 987 987 988 struct platform_driver tegra_dsi_driver = { 988 989 .driver = {
+1
drivers/gpu/drm/tegra/gr2d.c
··· 121 121 { .compatible = "nvidia,tegra20-gr2d" }, 122 122 { }, 123 123 }; 124 + MODULE_DEVICE_TABLE(of, gr2d_match); 124 125 125 126 static const u32 gr2d_addr_regs[] = { 126 127 GR2D_UA_BASE_ADDR,
+1
drivers/gpu/drm/tegra/gr3d.c
··· 130 130 { .compatible = "nvidia,tegra20-gr3d" }, 131 131 { } 132 132 }; 133 + MODULE_DEVICE_TABLE(of, tegra_gr3d_match); 133 134 134 135 static const u32 gr3d_addr_regs[] = { 135 136 GR3D_IDX_ATTRIBUTE( 0),
+1
drivers/gpu/drm/tegra/hdmi.c
··· 1450 1450 { .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config }, 1451 1451 { }, 1452 1452 }; 1453 + MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match); 1453 1454 1454 1455 static int tegra_hdmi_probe(struct platform_device *pdev) 1455 1456 {
+1
drivers/gpu/drm/tegra/sor.c
··· 1465 1465 { .compatible = "nvidia,tegra124-sor", }, 1466 1466 { }, 1467 1467 }; 1468 + MODULE_DEVICE_TABLE(of, tegra_sor_of_match); 1468 1469 1469 1470 struct platform_driver tegra_sor_driver = { 1470 1471 .driver = {