diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-03-09 12:24:26 -0500 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-26 19:53:20 -0400 |
commit | 42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (patch) | |
tree | 844f3b407e7cc7b335899909b81811e1369dcdef /drivers/mtd/maps/impa7.c | |
parent | ee478af8b675908b217198a75cf759d422a81ccb (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/impa7.c')
-rw-r--r-- | drivers/mtd/maps/impa7.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c index f47aedb24366..834a06c56f56 100644 --- a/drivers/mtd/maps/impa7.c +++ b/drivers/mtd/maps/impa7.c | |||
@@ -91,7 +91,7 @@ static int __init init_impa7(void) | |||
91 | if (impa7_mtd[i]) { | 91 | if (impa7_mtd[i]) { |
92 | impa7_mtd[i]->owner = THIS_MODULE; | 92 | impa7_mtd[i]->owner = THIS_MODULE; |
93 | devicesfound++; | 93 | devicesfound++; |
94 | mtd_device_parse_register(impa7_mtd[i], NULL, 0, | 94 | mtd_device_parse_register(impa7_mtd[i], NULL, NULL, |
95 | partitions, | 95 | partitions, |
96 | ARRAY_SIZE(partitions)); | 96 | ARRAY_SIZE(partitions)); |
97 | } | 97 | } |