mtd: physmap: add const qualifiers
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Apr 5 08:59:07 EDT 2013
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=f39cf6c7d472349a9907955ef213db1f26618ba0
Commit: f39cf6c7d472349a9907955ef213db1f26618ba0
Parent: d50dcb1d0e1f8ebe11db1719aad5753cd1b4c4f8
Author: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
AuthorDate: Tue Mar 12 10:32:52 2013 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Apr 5 13:02:40 2013 +0100
mtd: physmap: add const qualifiers
Be a bit stricter and add few more 'const' qualifiers.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/maps/physmap.c | 17 +++++++----------
include/linux/mtd/physmap.h | 2 +-
2 files changed, 8 insertions(+), 11 deletions(-)
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 21b0b71..e7a592c 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -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;
diff --git a/include/linux/mtd/physmap.h b/include/linux/mtd/physmap.h
index d2887e7..aa6a263 100644
--- a/include/linux/mtd/physmap.h
+++ b/include/linux/mtd/physmap.h
@@ -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__ */
More information about the linux-mtd-cvs
mailing list