projects/linux·commit b671e170

PNP: ide: constify pnp_device_id

b671e170 · Arvind Yadav <[email protected]> · 2017-08-16 10:24:32 +05:30

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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Commit
b671e1703394d77163130c91f53b075db1c446bf
Parents
510c8a89

Changes

1 files changed · +1 −1

FileStatusAddDelContent
drivers/ide/ide-pnp.cmodified+1−1View file

drivers/ide/ide-pnp.c

View file
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 = ""}