* [PATCH] nfc: pn544: mei: constify mei_cl_device_id
@ 2017-08-26 6:26 Arvind Yadav
2017-08-26 9:34 ` Winkler, Tomas
0 siblings, 1 reply; 2+ messages in thread
From: Arvind Yadav @ 2017-08-26 6:26 UTC (permalink / raw)
To: sameo, gregkh, tomas.winkler; +Cc: linux-kernel, linux-wireless
mei_cl_device_id are not supposed to change at runtime.
mei driver is working with const 'id_table'. So mark
the non-const mei_cl_device_id structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/nfc/pn544/mei.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c
index ad57a8e..a6c2e9c 100644
--- a/drivers/nfc/pn544/mei.c
+++ b/drivers/nfc/pn544/mei.c
@@ -66,7 +66,7 @@ static int pn544_mei_remove(struct mei_cl_device *cldev)
return 0;
}
-static struct mei_cl_device_id pn544_mei_tbl[] = {
+static const struct mei_cl_device_id pn544_mei_tbl[] = {
{ PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
/* required last entry */
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* RE: [PATCH] nfc: pn544: mei: constify mei_cl_device_id
2017-08-26 6:26 [PATCH] nfc: pn544: mei: constify mei_cl_device_id Arvind Yadav
@ 2017-08-26 9:34 ` Winkler, Tomas
0 siblings, 0 replies; 2+ messages in thread
From: Winkler, Tomas @ 2017-08-26 9:34 UTC (permalink / raw)
To: Arvind Yadav, sameo, gregkh; +Cc: linux-kernel, linux-wireless
>
> mei_cl_device_id are not supposed to change at runtime.
> mei driver is working with const 'id_table'. So mark the non-const
> mei_cl_device_id structs as const.
>
> Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Ack
> drivers/nfc/pn544/mei.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nfc/pn544/mei.c b/drivers/nfc/pn544/mei.c index
> ad57a8e..a6c2e9c 100644
> --- a/drivers/nfc/pn544/mei.c
> +++ b/drivers/nfc/pn544/mei.c
> @@ -66,7 +66,7 @@ static int pn544_mei_remove(struct mei_cl_device
> *cldev)
> return 0;
> }
>
> -static struct mei_cl_device_id pn544_mei_tbl[] = {
> +static const struct mei_cl_device_id pn544_mei_tbl[] = {
> { PN544_DRIVER_NAME, MEI_NFC_UUID, MEI_CL_VERSION_ANY},
>
> /* required last entry */
> --
> 2.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-26 9:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-26 6:26 [PATCH] nfc: pn544: mei: constify mei_cl_device_id Arvind Yadav
2017-08-26 9:34 ` Winkler, Tomas
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).