PNP: ide: constify pnp_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 16 Aug 2017 04:54:32 +0000 (10:24 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Aug 2017 18:25:16 +0000 (11:25 -0700)
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/ide-pnp.c

index f5f2b62471da919e4ffd859b8a96ae738d38cea8..859ddab9448fe690a16f2c2d6fad9e243a3ea1ee 100644 (file)
@@ -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 = ""}