[PATCH] drm/tegra: add MODULE_DEVICE_TABLEs

Thierry Reding thierry.reding at gmail.com
Wed Jun 18 14:51:00 PDT 2014


On Wed, Jun 18, 2014 at 03:19:15PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren at nvidia.com>
> 
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/dri-devel/attachments/20140618/c1786105/attachment.sig>


More information about the dri-devel mailing list