linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: max77620: constify platform_device_id
@ 2017-08-13 11:33 Arvind Yadav
  2017-08-25  2:34 ` Zhang Rui
  0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-13 11:33 UTC (permalink / raw)
  To: rui.zhang, edubezval, gregkh; +Cc: linux-kernel, linux-pm

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

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

diff --git a/drivers/thermal/max77620_thermal.c b/drivers/thermal/max77620_thermal.c
index 159bbce..3c74b91 100644
--- a/drivers/thermal/max77620_thermal.c
+++ b/drivers/thermal/max77620_thermal.c
@@ -149,7 +149,7 @@ static int max77620_thermal_probe(struct platform_device *pdev)
 	return 0;
 }
 
-static struct platform_device_id max77620_thermal_devtype[] = {
+static const struct platform_device_id max77620_thermal_devtype[] = {
 	{ .name = "max77620-thermal", },
 	{},
 };
-- 
2.7.4

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

* Re: [PATCH] thermal: max77620: constify platform_device_id
  2017-08-13 11:33 [PATCH] thermal: max77620: constify platform_device_id Arvind Yadav
@ 2017-08-25  2:34 ` Zhang Rui
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang Rui @ 2017-08-25  2:34 UTC (permalink / raw)
  To: Arvind Yadav, edubezval, gregkh; +Cc: linux-kernel, linux-pm

On Sun, 2017-08-13 at 17:03 +0530, Arvind Yadav wrote:
> platform_device_id are not supposed to change at runtime. All
> functions
> working with platform_device_id provided by <linux/platform_device.h>
> work with const platform_device_id. So mark the non-const structs as
> const.
> 
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>

applied.

thanks,
rui
> ---
>  drivers/thermal/max77620_thermal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/thermal/max77620_thermal.c
> b/drivers/thermal/max77620_thermal.c
> index 159bbce..3c74b91 100644
> --- a/drivers/thermal/max77620_thermal.c
> +++ b/drivers/thermal/max77620_thermal.c
> @@ -149,7 +149,7 @@ static int max77620_thermal_probe(struct
> platform_device *pdev)
>  	return 0;
>  }
>  
> -static struct platform_device_id max77620_thermal_devtype[] = {
> +static const struct platform_device_id max77620_thermal_devtype[] =
> {
>  	{ .name = "max77620-thermal", },
>  	{},
>  };

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

end of thread, other threads:[~2017-08-25  2:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-13 11:33 [PATCH] thermal: max77620: constify platform_device_id Arvind Yadav
2017-08-25  2:34 ` Zhang Rui

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