Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Artem Bityutskiy and committed by
David Woodhouse
cce2a026 255e9fd4

+9 -7
+9 -7
drivers/mtd/maps/physmap_of.c
··· 71 71 return 0; 72 72 } 73 73 74 + static const char * const rom_probe_types[] = { 75 + "cfi_probe", "jedec_probe", "map_rom" }; 76 + 74 77 /* Helper function to handle probing of the obsolete "direct-mapped" 75 78 * compatible binding, which has an extra "probe-type" property 76 79 * describing the type of flash probe necessary. */ ··· 83 80 struct device_node *dp = dev->dev.of_node; 84 81 const char *of_probe; 85 82 struct mtd_info *mtd; 86 - static const char *rom_probe_types[] 87 - = { "cfi_probe", "jedec_probe", "map_rom"}; 88 83 int i; 89 84 90 85 dev_warn(&dev->dev, "Device tree uses obsolete \"direct-mapped\" " ··· 112 111 specifies the list of partition probers to use. If none is given then the 113 112 default is use. These take precedence over other device tree 114 113 information. */ 115 - static const char *part_probe_types_def[] = { "cmdlinepart", "RedBoot", 116 - "ofpart", "ofoldpart", NULL }; 117 - static const char **of_get_probes(struct device_node *dp) 114 + static const char * const part_probe_types_def[] = { 115 + "cmdlinepart", "RedBoot", "ofpart", "ofoldpart", NULL }; 116 + 117 + static const char * const *of_get_probes(struct device_node *dp) 118 118 { 119 119 const char *cp; 120 120 int cplen; ··· 144 142 return res; 145 143 } 146 144 147 - static void of_free_probes(const char **probes) 145 + static void of_free_probes(const char * const *probes) 148 146 { 149 147 if (probes != part_probe_types_def) 150 148 kfree(probes); ··· 153 151 static struct of_device_id of_flash_match[]; 154 152 static int of_flash_probe(struct platform_device *dev) 155 153 { 156 - const char **part_probe_types; 154 + const char * const *part_probe_types; 157 155 const struct of_device_id *match; 158 156 struct device_node *dp = dev->dev.of_node; 159 157 struct resource res;