* [PATCH] i2c-cht-wc: constify platform_device_id
@ 2017-11-28 10:25 Arvind Yadav
2017-11-28 13:25 ` Hans de Goede
2017-12-07 11:01 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Arvind Yadav @ 2017-11-28 10:25 UTC (permalink / raw)
To: hdegoede, wsa; +Cc: linux-kernel, linux-i2c
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/i2c/busses/i2c-cht-wc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
index 190bbbc..db56759 100644
--- a/drivers/i2c/busses/i2c-cht-wc.c
+++ b/drivers/i2c/busses/i2c-cht-wc.c
@@ -342,7 +342,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
return 0;
}
-static struct platform_device_id cht_wc_i2c_adap_id_table[] = {
+static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
{ .name = "cht_wcove_ext_chgr" },
{},
};
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c-cht-wc: constify platform_device_id
2017-11-28 10:25 [PATCH] i2c-cht-wc: constify platform_device_id Arvind Yadav
@ 2017-11-28 13:25 ` Hans de Goede
2017-12-07 11:01 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2017-11-28 13:25 UTC (permalink / raw)
To: Arvind Yadav, wsa; +Cc: linux-kernel, linux-i2c
Hi,
On 28-11-17 11:25, 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>
Looks good to me:
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Regards,
Hans
> ---
> drivers/i2c/busses/i2c-cht-wc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-cht-wc.c b/drivers/i2c/busses/i2c-cht-wc.c
> index 190bbbc..db56759 100644
> --- a/drivers/i2c/busses/i2c-cht-wc.c
> +++ b/drivers/i2c/busses/i2c-cht-wc.c
> @@ -342,7 +342,7 @@ static int cht_wc_i2c_adap_i2c_remove(struct platform_device *pdev)
> return 0;
> }
>
> -static struct platform_device_id cht_wc_i2c_adap_id_table[] = {
> +static const struct platform_device_id cht_wc_i2c_adap_id_table[] = {
> { .name = "cht_wcove_ext_chgr" },
> {},
> };
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c-cht-wc: constify platform_device_id
2017-11-28 10:25 [PATCH] i2c-cht-wc: constify platform_device_id Arvind Yadav
2017-11-28 13:25 ` Hans de Goede
@ 2017-12-07 11:01 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2017-12-07 11:01 UTC (permalink / raw)
To: Arvind Yadav; +Cc: hdegoede, linux-kernel, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 393 bytes --]
On Tue, Nov 28, 2017 at 03:55:07PM +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 to for-current, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-07 11:01 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-28 10:25 [PATCH] i2c-cht-wc: constify platform_device_id Arvind Yadav
2017-11-28 13:25 ` Hans de Goede
2017-12-07 11:01 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.