devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE.
@ 2015-11-29 16:29 Enric Balletbo i Serra
  2016-01-11  6:08 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Enric Balletbo i Serra @ 2015-11-29 16:29 UTC (permalink / raw)
  To: devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: jingoohan1-Re5JQEeQqe8AvxtiuMwx3w,
	lee.jones-QSEj5FYQhm4dnm+yROfE0A, plagnioj-sclMFOaUSTBWk0Htik3J/w,
	tomi.valkeinen-l0cyMroinI0, linux-fbdev-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA

The device table is required to load modules based on modaliases.

Signed-off-by: Enric Balletbo i Serra <enric.balletbo-ZGY8ohtN/8qB+jHODAdFcQ@public.gmane.org>
---
Changes since last version:
- Use of_match_ptr (Lee Jones)

 drivers/video/backlight/tps65217_bl.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
index 61d72bf..fd524ad 100644
--- a/drivers/video/backlight/tps65217_bl.c
+++ b/drivers/video/backlight/tps65217_bl.c
@@ -320,10 +320,19 @@ 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",
+		.of_match_table = of_match_ptr(tps65217_bl_of_match),
 	},
 };
 
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE.
  2015-11-29 16:29 [PATCH v2] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE Enric Balletbo i Serra
@ 2016-01-11  6:08 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2016-01-11  6:08 UTC (permalink / raw)
  To: Enric Balletbo i Serra
  Cc: devicetree, jingoohan1, plagnioj, tomi.valkeinen, linux-fbdev,
	linux-kernel

On Sun, 29 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>
> ---
> Changes since last version:
> - Use of_match_ptr (Lee Jones)
> 
>  drivers/video/backlight/tps65217_bl.c | 9 +++++++++
>  1 file changed, 9 insertions(+)

Applied, thanks.

> diff --git a/drivers/video/backlight/tps65217_bl.c b/drivers/video/backlight/tps65217_bl.c
> index 61d72bf..fd524ad 100644
> --- a/drivers/video/backlight/tps65217_bl.c
> +++ b/drivers/video/backlight/tps65217_bl.c
> @@ -320,10 +320,19 @@ 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",
> +		.of_match_table = of_match_ptr(tps65217_bl_of_match),
>  	},
>  };
>  

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-11  6:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-29 16:29 [PATCH v2] backlight: tps65217_bl: Add MODULE_DEVICE_TABLE Enric Balletbo i Serra
2016-01-11  6:08 ` Lee Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).