Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1710489 > unrolled thread
| Started by | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| First post | 2017-08-13 13:40 +0200 |
| Last post | 2017-08-25 04:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] thermal: max77620: constify platform_device_id Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-13 13:40 +0200
Re: [PATCH] thermal: max77620: constify platform_device_id Zhang Rui <rui.zhang@intel.com> - 2017-08-25 04:40 +0200
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Date | 2017-08-13 13:40 +0200 |
| Subject | [PATCH] thermal: max77620: constify platform_device_id |
| Message-ID | <udZpo-6BB-13@gated-at.bofh.it> |
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
[toc] | [next] | [standalone]
| From | Zhang Rui <rui.zhang@intel.com> |
|---|---|
| Date | 2017-08-25 04:40 +0200 |
| Message-ID | <uicHn-6Cb-1@gated-at.bofh.it> |
| In reply to | #1710489 |
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", },
> {},
> };
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web