diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2013-03-12 04:42:56 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2013-04-05 08:04:13 -0400 |
commit | cce2a026b5778001002dcab0dadec100d8959846 (patch) | |
tree | f08516ce62d14742d649929f0e9b47a1e399160a | |
parent | 255e9fd4b10005fe95d4c1862d6428f7a857deb9 (diff) |
mtd: physmap_of: add const qualifiers
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>
-rw-r--r-- | drivers/mtd/maps/physmap_of.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index 363939dfad05..d11109762ac5 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c | |||
@@ -71,6 +71,9 @@ static int of_flash_remove(struct platform_device *dev) | |||
71 | return 0; | 71 | return 0; |
72 | } | 72 | } |
73 | 73 | ||
74 | static const char * const rom_probe_types[] = { | ||
75 | "cfi_probe", "jedec_probe", "map_rom" }; | ||
76 | |||
74 | /* Helper function to handle probing of the obsolete "direct-mapped" | 77 | /* Helper function to handle probing of the obsolete "direct-mapped" |
75 | * compatible binding, which has an extra "probe-type" property | 78 | * compatible binding, which has an extra "probe-type" property |
76 | * describing the type of flash probe necessary. */ | 79 | * describing the type of flash probe necessary. */ |
@@ -80,8 +83,6 @@ static struct mtd_info *obsolete_probe(struct platform_device *dev, | |||
80 | struct device_node *dp = dev->dev.of_node; | 83 | struct device_node *dp = dev->dev.of_node; |
81 | const char *of_probe; | 84 | const char *of_probe; |
82 | struct mtd_info *mtd; | 85 | struct mtd_info *mtd; |
83 | static const char *rom_probe_types[] | ||
84 | = { "cfi_probe", "jedec_probe", "map_rom"}; | ||
85 | int i; | 86 | int i; |
86 | 87 | ||
87 | dev_warn(&dev->dev, "Device tree uses obsolete \"direct-mapped\" " | 88 | 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 | specifies the list of partition probers to use. If none is given then the | 112 | specifies the list of partition probers to use. If none is given then the |
112 | default is use. These take precedence over other device tree | 113 | default is use. These take precedence over other device tree |
113 | information. */ | 114 | information. */ |
114 | static const char *part_probe_types_def[] = { "cmdlinepart", "RedBoot", | 115 | static const char * const part_probe_types_def[] = { |
115 | "ofpart", "ofoldpart", NULL }; | 116 | "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; |
116 | static const char **of_get_probes(struct device_node *dp) | 117 | |
118 | static const char * const *of_get_probes(struct device_node *dp) | ||
117 | { | 119 | { |
118 | const char *cp; | 120 | const char *cp; |
119 | int cplen; | 121 | int cplen; |
@@ -142,7 +144,7 @@ static const char **of_get_probes(struct device_node *dp) | |||
142 | return res; | 144 | return res; |
143 | } | 145 | } |
144 | 146 | ||
145 | static void of_free_probes(const char **probes) | 147 | static void of_free_probes(const char * const *probes) |
146 | { | 148 | { |
147 | if (probes != part_probe_types_def) | 149 | if (probes != part_probe_types_def) |
148 | kfree(probes); | 150 | kfree(probes); |
@@ -151,7 +153,7 @@ static void of_free_probes(const char **probes) | |||
151 | static struct of_device_id of_flash_match[]; | 153 | static struct of_device_id of_flash_match[]; |
152 | static int of_flash_probe(struct platform_device *dev) | 154 | static int of_flash_probe(struct platform_device *dev) |
153 | { | 155 | { |
154 | const char **part_probe_types; | 156 | const char * const *part_probe_types; |
155 | const struct of_device_id *match; | 157 | const struct of_device_id *match; |
156 | struct device_node *dp = dev->dev.of_node; | 158 | struct device_node *dp = dev->dev.of_node; |
157 | struct resource res; | 159 | struct resource res; |