mtd: physmap: add const qualifiers
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Tue, 12 Mar 2013 08:32:52 +0000 (10:32 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Fri, 5 Apr 2013 12:02:40 +0000 (13:02 +0100)
Be a bit stricter and add few more 'const' qualifiers.

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
drivers/mtd/maps/physmap.c
include/linux/mtd/physmap.h

index 21b0b713cacb8fd8cb1870b6341ac69c08354d19..e7a592c8c76591e02257e5c39b891aefbf43d9d3 100644 (file)
@@ -87,21 +87,18 @@ static void physmap_set_vpp(struct map_info *map, int state)
        spin_unlock_irqrestore(&info->vpp_lock, flags);
 }
 
-static const char *rom_probe_types[] = {
-                                       "cfi_probe",
-                                       "jedec_probe",
-                                       "qinfo_probe",
-                                       "map_rom",
-                                       NULL };
-static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", "afs",
-                                         NULL };
+static const char * const rom_probe_types[] = {
+       "cfi_probe", "jedec_probe", "qinfo_probe", "map_rom", NULL };
+
+static const char * const part_probe_types[] = {
+       "cmdlinepart", "RedBoot", "afs", NULL };
 
 static int physmap_flash_probe(struct platform_device *dev)
 {
        struct physmap_flash_data *physmap_data;
        struct physmap_flash_info *info;
-       const char **probe_type;
-       const char **part_types;
+       const char * const *probe_type;
+       const char * const *part_types;
        int err = 0;
        int i;
        int devices_found = 0;
index d2887e76b7f66845b3662c9c52b80b211b78f38b..aa6a2633c2da13697a0a969ab320973756f155b3 100644 (file)
@@ -30,7 +30,7 @@ struct physmap_flash_data {
        unsigned int            pfow_base;
        char                    *probe_type;
        struct mtd_partition    *parts;
-       const char              **part_probe_types;
+       const char * const      *part_probe_types;
 };
 
 #endif /* __LINUX_MTD_PHYSMAP__ */