public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PNP: ide: constify pnp_device_id
@ 2017-08-16  4:54 Arvind Yadav
  2017-08-16  4:55 ` [PATCH] net: 3c509: " Arvind Yadav
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Arvind Yadav @ 2017-08-16  4:54 UTC (permalink / raw)
  To: davem; +Cc: linux-kernel, linux-ide

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

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

diff --git a/drivers/ide/ide-pnp.c b/drivers/ide/ide-pnp.c
index f5f2b62..859ddab 100644
--- a/drivers/ide/ide-pnp.c
+++ b/drivers/ide/ide-pnp.c
@@ -22,7 +22,7 @@
 #define DRV_NAME "ide-pnp"
 
 /* Add your devices here :)) */
-static struct pnp_device_id idepnp_devices[] = {
+static const struct pnp_device_id idepnp_devices[] = {
 	/* Generic ESDI/IDE/ATA compatible hard disk controller */
 	{.id = "PNP0600", .driver_data = 0},
 	{.id = ""}
-- 
2.7.4

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

end of thread, other threads:[~2017-08-30  3:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-16  4:54 [PATCH] PNP: ide: constify pnp_device_id Arvind Yadav
2017-08-16  4:55 ` [PATCH] net: 3c509: " Arvind Yadav
2017-08-16 18:26   ` David Miller
2017-08-16  4:57 ` [PATCH] watchdog: sc1200: " Arvind Yadav
2017-08-30  3:22   ` Guenter Roeck
2017-08-16  4:58 ` [PATCH] scsi: ncr5380: " Arvind Yadav
2017-08-16  7:17   ` Finn Thain
2017-08-17  0:54   ` Martin K. Petersen
2017-08-16  4:59 ` [PATCH] scsi: aha1542: " Arvind Yadav
2017-08-16 18:10 ` [PATCH] PNP: ide: " David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox