aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/physmap.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-03-09 12:24:26 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:53:20 -0400
commit42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (patch)
tree844f3b407e7cc7b335899909b81811e1369dcdef /drivers/mtd/maps/physmap.c
parentee478af8b675908b217198a75cf759d422a81ccb (diff)
mtd: do not use plain 0 as NULL
The first 3 arguments of 'mtd_device_parse_register()' are pointers, but many callers pass '0' instead of 'NULL'. Fix this globally. Thanks to coccinelle for making it easy to do with the following semantic patch: @@ expression mtd, types, parser_data, parts, nr_parts; @@ ( -mtd_device_parse_register(mtd, 0, parser_data, parts, nr_parts) +mtd_device_parse_register(mtd, NULL, parser_data, parts, nr_parts) | -mtd_device_parse_register(mtd, types, 0, parts, nr_parts) +mtd_device_parse_register(mtd, types, NULL, parts, nr_parts) | -mtd_device_parse_register(mtd, types, parser_data, 0, nr_parts) +mtd_device_parse_register(mtd, types, parser_data, NULL, nr_parts) ) Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/maps/physmap.c')
-rw-r--r--drivers/mtd/maps/physmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 7e9233c503ab..21b0b713cacb 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -192,7 +192,7 @@ static int physmap_flash_probe(struct platform_device *dev)
192 192
193 part_types = physmap_data->part_probe_types ? : part_probe_types; 193 part_types = physmap_data->part_probe_types ? : part_probe_types;
194 194
195 mtd_device_parse_register(info->cmtd, part_types, 0, 195 mtd_device_parse_register(info->cmtd, part_types, NULL,
196 physmap_data->parts, physmap_data->nr_parts); 196 physmap_data->parts, physmap_data->nr_parts);
197 return 0; 197 return 0;
198 198