4ff9788
From: Stephen Warren <swarren@xxxxxxxxxx>
4ff9788
4ff9788
When tegra-drm.ko is built as a module, these MODULE_DEVICE_TABLEs allow
4ff9788
the module to be auto-loaded since the module will match the devices
4ff9788
instantiated from device tree.
4ff9788
4ff9788
(Notes for stable: in 3.14+, just git rm any conflicting file, since they
4ff9788
are added in later kernels. For 3.13 and below, manual merging will be
4ff9788
needed)
4ff9788
4ff9788
Cc: <stable@xxxxxxxxxxxxxxx>
4ff9788
Signed-off-by: Stephen Warren <swarren@xxxxxxxxxx>
4ff9788
---
4ff9788
v2: Remove change to drm.c, since the match table there isn't used for
4ff9788
probing.
4ff9788
---
4ff9788
 drivers/gpu/drm/tegra/dc.c    | 1 +
4ff9788
 drivers/gpu/drm/tegra/dpaux.c | 1 +
4ff9788
 drivers/gpu/drm/tegra/dsi.c   | 1 +
4ff9788
 drivers/gpu/drm/tegra/gr2d.c  | 1 +
4ff9788
 drivers/gpu/drm/tegra/gr3d.c  | 1 +
4ff9788
 drivers/gpu/drm/tegra/hdmi.c  | 1 +
4ff9788
 drivers/gpu/drm/tegra/sor.c   | 1 +
4ff9788
 7 files changed, 7 insertions(+)
4ff9788
4ff9788
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
4ff9788
index ef40381f3909..48c3bc460eef 100644
4ff9788
--- a/drivers/gpu/drm/tegra/dc.c
4ff9788
+++ b/drivers/gpu/drm/tegra/dc.c
4ff9788
@@ -1303,6 +1303,7 @@ static const struct of_device_id tegra_dc_of_match[] = {
4ff9788
 		/* sentinel */
4ff9788
 	}
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_dc_of_match);
4ff9788
 
4ff9788
 static int tegra_dc_parse_dt(struct tegra_dc *dc)
4ff9788
 {
4ff9788
diff --git a/drivers/gpu/drm/tegra/dpaux.c b/drivers/gpu/drm/tegra/dpaux.c
4ff9788
index 3f132e356e9c..708f783ead47 100644
4ff9788
--- a/drivers/gpu/drm/tegra/dpaux.c
4ff9788
+++ b/drivers/gpu/drm/tegra/dpaux.c
4ff9788
@@ -382,6 +382,7 @@ static const struct of_device_id tegra_dpaux_of_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra124-dpaux", },
4ff9788
 	{ },
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match);
4ff9788
 
4ff9788
 struct platform_driver tegra_dpaux_driver = {
4ff9788
 	.driver = {
4ff9788
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
4ff9788
index bd56f2affa78..97c409f10456 100644
4ff9788
--- a/drivers/gpu/drm/tegra/dsi.c
4ff9788
+++ b/drivers/gpu/drm/tegra/dsi.c
4ff9788
@@ -982,6 +982,7 @@ static const struct of_device_id tegra_dsi_of_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra114-dsi", },
4ff9788
 	{ },
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_dsi_of_match);
4ff9788
 
4ff9788
 struct platform_driver tegra_dsi_driver = {
4ff9788
 	.driver = {
4ff9788
diff --git a/drivers/gpu/drm/tegra/gr2d.c b/drivers/gpu/drm/tegra/gr2d.c
4ff9788
index 7c53941f2a9e..02cd3e37a6ec 100644
4ff9788
--- a/drivers/gpu/drm/tegra/gr2d.c
4ff9788
+++ b/drivers/gpu/drm/tegra/gr2d.c
4ff9788
@@ -121,6 +121,7 @@ static const struct of_device_id gr2d_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra20-gr2d" },
4ff9788
 	{ },
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, gr2d_match);
4ff9788
 
4ff9788
 static const u32 gr2d_addr_regs[] = {
4ff9788
 	GR2D_UA_BASE_ADDR,
4ff9788
diff --git a/drivers/gpu/drm/tegra/gr3d.c b/drivers/gpu/drm/tegra/gr3d.c
4ff9788
index 30f5ba9bd6d0..2bea2b2d204e 100644
4ff9788
--- a/drivers/gpu/drm/tegra/gr3d.c
4ff9788
+++ b/drivers/gpu/drm/tegra/gr3d.c
4ff9788
@@ -130,6 +130,7 @@ static const struct of_device_id tegra_gr3d_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra20-gr3d" },
4ff9788
 	{ }
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_gr3d_match);
4ff9788
 
4ff9788
 static const u32 gr3d_addr_regs[] = {
4ff9788
 	GR3D_IDX_ATTRIBUTE( 0),
4ff9788
diff --git a/drivers/gpu/drm/tegra/hdmi.c b/drivers/gpu/drm/tegra/hdmi.c
4ff9788
index a0b8d8539d07..84ea0c8b47f7 100644
4ff9788
--- a/drivers/gpu/drm/tegra/hdmi.c
4ff9788
+++ b/drivers/gpu/drm/tegra/hdmi.c
4ff9788
@@ -1370,6 +1370,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config },
4ff9788
 	{ },
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match);
4ff9788
 
4ff9788
 static int tegra_hdmi_probe(struct platform_device *pdev)
4ff9788
 {
4ff9788
diff --git a/drivers/gpu/drm/tegra/sor.c b/drivers/gpu/drm/tegra/sor.c
4ff9788
index 27c979b50111..061a5c501124 100644
4ff9788
--- a/drivers/gpu/drm/tegra/sor.c
4ff9788
+++ b/drivers/gpu/drm/tegra/sor.c
4ff9788
@@ -1455,6 +1455,7 @@ static const struct of_device_id tegra_sor_of_match[] = {
4ff9788
 	{ .compatible = "nvidia,tegra124-sor", },
4ff9788
 	{ },
4ff9788
 };
4ff9788
+MODULE_DEVICE_TABLE(of, tegra_sor_of_match);
4ff9788
 
4ff9788
 struct platform_driver tegra_sor_driver = {
4ff9788
 	.driver = {
4ff9788
-- 
4ff9788
1.8.1.5