Commit 16b60906 authored by Stephen Warren's avatar Stephen Warren Committed by Kamal Mostafa

drm/tegra: add MODULE_DEVICE_TABLEs

commit ef70728c upstream.

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)
Signed-off-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
[ kamal: backport to 3.13: context; skip modules added later ]
Signed-off-by: default avatarKamal Mostafa <kamal@canonical.com>
parent 1403cb08
...@@ -1252,6 +1252,7 @@ static struct of_device_id tegra_dc_of_match[] = { ...@@ -1252,6 +1252,7 @@ static struct of_device_id tegra_dc_of_match[] = {
{ .compatible = "nvidia,tegra20-dc", }, { .compatible = "nvidia,tegra20-dc", },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, tegra_dc_of_match);
struct platform_driver tegra_dc_driver = { struct platform_driver tegra_dc_driver = {
.driver = { .driver = {
......
...@@ -129,6 +129,7 @@ static const struct of_device_id gr2d_match[] = { ...@@ -129,6 +129,7 @@ static const struct of_device_id gr2d_match[] = {
{ .compatible = "nvidia,tegra20-gr2d" }, { .compatible = "nvidia,tegra20-gr2d" },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, gr2d_match);
static const u32 gr2d_addr_regs[] = { static const u32 gr2d_addr_regs[] = {
GR2D_UA_BASE_ADDR, GR2D_UA_BASE_ADDR,
......
...@@ -127,6 +127,7 @@ static const struct of_device_id tegra_gr3d_match[] = { ...@@ -127,6 +127,7 @@ static const struct of_device_id tegra_gr3d_match[] = {
{ .compatible = "nvidia,tegra20-gr3d" }, { .compatible = "nvidia,tegra20-gr3d" },
{ } { }
}; };
MODULE_DEVICE_TABLE(of, tegra_gr3d_match);
static const u32 gr3d_addr_regs[] = { static const u32 gr3d_addr_regs[] = {
GR3D_IDX_ATTRIBUTE( 0), GR3D_IDX_ATTRIBUTE( 0),
......
...@@ -1309,6 +1309,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = { ...@@ -1309,6 +1309,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = {
{ .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config }, { .compatible = "nvidia,tegra20-hdmi", .data = &tegra20_hdmi_config },
{ }, { },
}; };
MODULE_DEVICE_TABLE(of, tegra_hdmi_of_match);
static int tegra_hdmi_probe(struct platform_device *pdev) static int tegra_hdmi_probe(struct platform_device *pdev)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment