Commit cce2a026 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: physmap_of: add const qualifiers

Be a bit stricter and add few more 'const' qualifiers.
Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 255e9fd4
...@@ -71,6 +71,9 @@ static int of_flash_remove(struct platform_device *dev) ...@@ -71,6 +71,9 @@ static int of_flash_remove(struct platform_device *dev)
return 0; return 0;
} }
static const char * const rom_probe_types[] = {
"cfi_probe", "jedec_probe", "map_rom" };
/* Helper function to handle probing of the obsolete "direct-mapped" /* Helper function to handle probing of the obsolete "direct-mapped"
* compatible binding, which has an extra "probe-type" property * compatible binding, which has an extra "probe-type" property
* describing the type of flash probe necessary. */ * describing the type of flash probe necessary. */
...@@ -80,8 +83,6 @@ static struct mtd_info *obsolete_probe(struct platform_device *dev, ...@@ -80,8 +83,6 @@ static struct mtd_info *obsolete_probe(struct platform_device *dev,
struct device_node *dp = dev->dev.of_node; struct device_node *dp = dev->dev.of_node;
const char *of_probe; const char *of_probe;
struct mtd_info *mtd; struct mtd_info *mtd;
static const char *rom_probe_types[]
= { "cfi_probe", "jedec_probe", "map_rom"};
int i; int i;
dev_warn(&dev->dev, "Device tree uses obsolete \"direct-mapped\" " dev_warn(&dev->dev, "Device tree uses obsolete \"direct-mapped\" "
...@@ -111,9 +112,10 @@ static struct mtd_info *obsolete_probe(struct platform_device *dev, ...@@ -111,9 +112,10 @@ static struct mtd_info *obsolete_probe(struct platform_device *dev,
specifies the list of partition probers to use. If none is given then the specifies the list of partition probers to use. If none is given then the
default is use. These take precedence over other device tree default is use. These take precedence over other device tree
information. */ information. */
static const char *part_probe_types_def[] = { "cmdlinepart", "RedBoot", static const char * const part_probe_types_def[] = {
"ofpart", "ofoldpart", NULL }; "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL };
static const char **of_get_probes(struct device_node *dp)
static const char * const *of_get_probes(struct device_node *dp)
{ {
const char *cp; const char *cp;
int cplen; int cplen;
...@@ -142,7 +144,7 @@ static const char **of_get_probes(struct device_node *dp) ...@@ -142,7 +144,7 @@ static const char **of_get_probes(struct device_node *dp)
return res; return res;
} }
static void of_free_probes(const char **probes) static void of_free_probes(const char * const *probes)
{ {
if (probes != part_probe_types_def) if (probes != part_probe_types_def)
kfree(probes); kfree(probes);
...@@ -151,7 +153,7 @@ static void of_free_probes(const char **probes) ...@@ -151,7 +153,7 @@ static void of_free_probes(const char **probes)
static struct of_device_id of_flash_match[]; static struct of_device_id of_flash_match[];
static int of_flash_probe(struct platform_device *dev) static int of_flash_probe(struct platform_device *dev)
{ {
const char **part_probe_types; const char * const *part_probe_types;
const struct of_device_id *match; const struct of_device_id *match;
struct device_node *dp = dev->dev.of_node; struct device_node *dp = dev->dev.of_node;
struct resource res; struct resource res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment