On Wed, Jun 18, 2014 at 03:19:15PM -0600, Stephen Warren wrote: > From: Stephen Warren <swarren@xxxxxxxxxx> > > 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. I vaguely remember doing something like this a while back and getting a bunch of link-time errors. But I assume that you've tested this, so I must be remembering wrongly. One comment below: > diff --git a/drivers/gpu/drm/tegra/drm.c b/drivers/gpu/drm/tegra/drm.c > index 3396f9f6a9f7..a1f9b06a75d5 100644 > --- a/drivers/gpu/drm/tegra/drm.c > +++ b/drivers/gpu/drm/tegra/drm.c > @@ -694,6 +694,7 @@ static const struct of_device_id host1x_drm_subdevs[] = { > { .compatible = "nvidia,tegra124-hdmi", }, > { /* sentinel */ } > }; > +MODULE_DEVICE_TABLE(of, host1x_drm_subdevs); I don't think this one is really required. It's a union of all other compatible values and only used to delay the DRM subsystem driver registration until all needed subdevices have been probed. Thierry
Attachment:
pgpGNlf2kNls5.pgp
Description: PGP signature