Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276634

Re: [PATCH] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE.

From Lee Jones <lee.jones@linaro.org>
Newsgroups linux.kernel
Subject Re: [PATCH] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE.
Date 2015-11-24 17:40 +0100
Message-ID <qyoNk-29z-21@gated-at.bofh.it> (permalink)
References <quluG-6hC-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Fri, 13 Nov 2015, Enric Balletbo i Serra wrote:

> The device table is required to load modules based on modaliases.
> 
> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
> ---
>  drivers/video/backlight/tps65217_bl.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
> index 61d72bf..37a9731 100644
> --- a/drivers/video/backlight/tps65217_bl.c
> +++ b/drivers/video/backlight/tps65217_bl.c
> @@ -320,10 +320,21 @@ static int tps65217_bl_probe(struct platform_device *pdev)
>  	return 0;
>  }
>  
> +#ifdef CONFIG_OF
> +static const struct of_device_id tps65217_bl_of_match[] = {
> +	{ .compatible = "ti,tps65217-bl", },
> +	{ /* sentinel */ },
> +};
> +MODULE_DEVICE_TABLE(of, tps65217_bl_of_match);
> +#endif
> +
>  static struct platform_driver tps65217_bl_driver = {
>  	.probe		= tps65217_bl_probe,
>  	.driver		= {
>  		.name	= "tps65217-bl",
> +#ifdef CONFIG_OF
> +		.of_match_table = tps65217_bl_of_match,
> +#endif

Please use of_match_ptr() instead.

>  	},
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE. Lee Jones <lee.jones@linaro.org> - 2015-11-24 17:40 +0100

csiph-web