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

* Re: [PATCH] backlight: pwm_bl: make of_device_ids const
  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
  2 siblings, 1 reply; 5+ messages in thread
From: Daniel Thompson @ 2017-06-20 10:52 UTC (permalink / raw)
  To: Arvind Yadav, thierry.reding, lee.jones, jingoohan1, b.zolnierkie
  Cc: linux-pwm, linux-fbdev, linux-kernel

On 20/06/17 08:52, Arvind Yadav wrote:
> 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>

Acked-by: Daniel Thompson <daniel.thompson@linaro.org>


> ---
>   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" },
>   	{ }
>   };
> 


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

* Re: [PATCH] backlight: pwm_bl: make of_device_ids const
  2017-06-20 10:52 ` Daniel Thompson
@ 2017-06-20 13:59   ` Jingoo Han
  0 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2017-06-20 13:59 UTC (permalink / raw)
  To: 'Daniel Thompson', 'Arvind Yadav', thierry.reding,
	lee.jones, b.zolnierkie
  Cc: linux-pwm, linux-fbdev, linux-kernel

On Tuesday, June 20, 2017 6:53 AM, Daniel Thompson wrote:
> 
> On 20/06/17 08:52, Arvind Yadav wrote:
> > 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>
> 
> Acked-by: Daniel Thompson <daniel.thompson@linaro.org>

Acked-by: Jingoo Han <jingoohan1@gmail.com>

Best regards,
Jingoo Han

> 
> 
> > ---
> >   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" },
> >   	{ }
> >   };
> >



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

* Re: [PATCH] backlight: pwm_bl: make of_device_ids const
  2017-06-20  7:52 [PATCH] backlight: pwm_bl: make of_device_ids const Arvind Yadav
  2017-06-20 10:52 ` Daniel Thompson
@ 2017-07-06  6:42 ` Thierry Reding
  2017-07-17 12:21 ` Lee Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Thierry Reding @ 2017-07-06  6:42 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: lee.jones, daniel.thompson, jingoohan1, b.zolnierkie, linux-pwm,
	linux-fbdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 481 bytes --]

On Tue, Jun 20, 2017 at 01:22:15PM +0530, Arvind Yadav wrote:
> 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(-)

Acked-by: Thierry Reding <thierry.reding@gmail.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH] backlight: pwm_bl: make of_device_ids const
  2017-06-20  7:52 [PATCH] backlight: pwm_bl: make of_device_ids const Arvind Yadav
  2017-06-20 10:52 ` Daniel Thompson
  2017-07-06  6:42 ` Thierry Reding
@ 2017-07-17 12:21 ` Lee Jones
  2 siblings, 0 replies; 5+ messages in thread
From: Lee Jones @ 2017-07-17 12:21 UTC (permalink / raw)
  To: Arvind Yadav
  Cc: thierry.reding, daniel.thompson, jingoohan1, b.zolnierkie,
	linux-pwm, linux-fbdev, linux-kernel

On Tue, 20 Jun 2017, Arvind Yadav wrote:

> 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(-)

Applied, thanks.

> 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" },
>  	{ }
>  };

-- 
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] 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).