Skip to content

Commit

Permalink
drm/tegra: add MODULE_DEVICE_TABLEs
Browse files Browse the repository at this point in the history
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: <[email protected]>
Signed-off-by: Stephen Warren <[email protected]>
Signed-off-by: Thierry Reding <[email protected]>
  • Loading branch information
nvswarren authored and thierryreding committed Aug 4, 2014
1 parent 5482d75 commit ef70728
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1394,6 +1394,7 @@ static const struct of_device_id tegra_dc_of_match[] = {
/* sentinel */
}
};
MODULE_DEVICE_TABLE(of, tegra_dc_of_match);

static int tegra_dc_parse_dt(struct tegra_dc *dc)
{
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/dpaux.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,7 @@ static const struct of_device_id tegra_dpaux_of_match[] = {
{ .compatible = "nvidia,tegra124-dpaux", },
{ },
};
MODULE_DEVICE_TABLE(of, tegra_dpaux_of_match);

struct platform_driver tegra_dpaux_driver = {
.driver = {
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -983,6 +983,7 @@ static const struct of_device_id tegra_dsi_of_match[] = {
{ .compatible = "nvidia,tegra114-dsi", },
{ },
};
MODULE_DEVICE_TABLE(of, tegra_dsi_of_match);

struct platform_driver tegra_dsi_driver = {
.driver = {
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/gr2d.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ static const struct of_device_id gr2d_match[] = {
{ .compatible = "nvidia,tegra20-gr2d" },
{ },
};
MODULE_DEVICE_TABLE(of, gr2d_match);

static const u32 gr2d_addr_regs[] = {
GR2D_UA_BASE_ADDR,
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/gr3d.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static const struct of_device_id tegra_gr3d_match[] = {
{ .compatible = "nvidia,tegra20-gr3d" },
{ }
};
MODULE_DEVICE_TABLE(of, tegra_gr3d_match);

static const u32 gr3d_addr_regs[] = {
GR3D_IDX_ATTRIBUTE( 0),
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/hdmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1450,6 +1450,7 @@ static const struct of_device_id tegra_hdmi_of_match[] = {
{ .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)
{
Expand Down
1 change: 1 addition & 0 deletions drivers/gpu/drm/tegra/sor.c
Original file line number Diff line number Diff line change
Expand Up @@ -1465,6 +1465,7 @@ static const struct of_device_id tegra_sor_of_match[] = {
{ .compatible = "nvidia,tegra124-sor", },
{ },
};
MODULE_DEVICE_TABLE(of, tegra_sor_of_match);

struct platform_driver tegra_sor_driver = {
.driver = {
Expand Down

0 comments on commit ef70728

Please sign in to comment.