OSDN Git Service

scsi: ncr5380: constify pnp_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Wed, 16 Aug 2017 04:58:40 +0000 (10:28 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:05 +0000 (22:29 -0400)
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>
Acked-by: Finn Thain <fthain@telegraphics.com.au>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/g_NCR5380.c

index b4da481..edf990b 100644 (file)
@@ -736,7 +736,7 @@ static struct isa_driver generic_NCR5380_isa_driver = {
 };
 
 #ifdef CONFIG_PNP
-static struct pnp_device_id generic_NCR5380_pnp_ids[] = {
+static const struct pnp_device_id generic_NCR5380_pnp_ids[] = {
        { .id = "DTC436e", .driver_data = BOARD_DTC3181E },
        { .id = "" }
 };