diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-03-09 21:24:26 +0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-27 03:53:20 +0400 |
commit | 42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (patch) | |
tree | 844f3b407e7cc7b335899909b81811e1369dcdef /drivers/mtd/maps/solutionengine.c | |
parent | ee478af8b675908b217198a75cf759d422a81ccb (diff) | |
download | linux-42d7fbe223ab878b23de9e3b0166f8cd665a2aa5.tar.xz |
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/solutionengine.c')
-rw-r--r-- | drivers/mtd/maps/solutionengine.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/maps/solutionengine.c b/drivers/mtd/maps/solutionengine.c index 496c40704aff..9d900ada6708 100644 --- a/drivers/mtd/maps/solutionengine.c +++ b/drivers/mtd/maps/solutionengine.c @@ -92,8 +92,8 @@ static int __init init_soleng_maps(void) mtd_device_register(eprom_mtd, NULL, 0); } - mtd_device_parse_register(flash_mtd, probes, 0, - superh_se_partitions, NUM_PARTITIONS); + mtd_device_parse_register(flash_mtd, probes, NULL, + superh_se_partitions, NUM_PARTITIONS); return 0; } |