linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] backlight: pwm_bl: make of_device_ids const
@ 2017-06-20  7:52 Arvind Yadav
  2017-06-20 10:52 ` Daniel Thompson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arvind Yadav @ 2017-06-20  7:52 UTC (permalink / raw)
  To: thierry.reding, lee.jones, daniel.thompson, jingoohan1,
	b.zolnierkie
  Cc: linux-pwm, linux-fbdev, linux-kernel

of_device_ids are not supposed to change at runtime. All functions
working with of_device_ids provided by <linux/of.h> work with const
of_device_ids. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/video/backlight/pwm_bl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c
index 002f1ce..9bd1768 100644
--- a/drivers/video/backlight/pwm_bl.c
+++ b/drivers/video/backlight/pwm_bl.c
@@ -178,7 +178,7 @@ static int pwm_backlight_parse_dt(struct device *dev,
 	return 0;
 }
 
-static struct of_device_id pwm_backlight_of_match[] = {
+static const struct of_device_id pwm_backlight_of_match[] = {
 	{ .compatible = "pwm-backlight" },
 	{ }
 };
-- 
1.9.1


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

end of thread, other threads:[~2017-07-17 12:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-20  7:52 [PATCH] backlight: pwm_bl: make of_device_ids const Arvind Yadav
2017-06-20 10:52 ` Daniel Thompson
2017-06-20 13:59   ` Jingoo Han
2017-07-06  6:42 ` Thierry Reding
2017-07-17 12:21 ` 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).