Re: [PATCH 1/3] iio: light: opt3001: Export OF device ID table as module aliases

From: Jonathan Cameron
Date: Sat Jan 21 2017 - 09:23:11 EST


On 16/01/17 15:50, Javier Martinez Canillas wrote:
> The I2C core always reports a MODALIAS of the form i2c:<foo> even if the
> device was registered via OF, this means that exporting the OF device ID
> table device aliases in the module is not needed. But in order to change
> how the core reports modaliases to user-space, it's better to export it.
>
> Signed-off-by: Javier Martinez Canillas <javier@xxxxxxxxxxxxxxx>
Applied to the togreg branch of iio.git and pushed out as testing for the
autobuilders to play with it.

Thanks,

Jonathan
> ---
>
> drivers/iio/light/opt3001.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
> index 78c9b3a6453a..b91ebc3483ce 100644
> --- a/drivers/iio/light/opt3001.c
> +++ b/drivers/iio/light/opt3001.c
> @@ -840,6 +840,7 @@ static const struct of_device_id opt3001_of_match[] = {
> { .compatible = "ti,opt3001" },
> { }
> };
> +MODULE_DEVICE_TABLE(of, opt3001_of_match);
>
> static struct i2c_driver opt3001_driver = {
> .probe = opt3001_probe,
>