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/nand/ppchameleonevb.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/nand/ppchameleonevb.c')
-rw-r--r-- | drivers/mtd/nand/ppchameleonevb.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/mtd/nand/ppchameleonevb.c b/drivers/mtd/nand/ppchameleonevb.c index 7e52af51a198..0ddd90e5788f 100644 --- a/drivers/mtd/nand/ppchameleonevb.c +++ b/drivers/mtd/nand/ppchameleonevb.c | |||
@@ -275,11 +275,10 @@ static int __init ppchameleonevb_init(void) | |||
275 | ppchameleon_mtd->name = "ppchameleon-nand"; | 275 | ppchameleon_mtd->name = "ppchameleon-nand"; |
276 | 276 | ||
277 | /* Register the partitions */ | 277 | /* Register the partitions */ |
278 | mtd_device_parse_register(ppchameleon_mtd, NULL, 0, | 278 | mtd_device_parse_register(ppchameleon_mtd, NULL, NULL, |
279 | ppchameleon_mtd->size == NAND_SMALL_SIZE ? | 279 | ppchameleon_mtd->size == NAND_SMALL_SIZE ? |
280 | partition_info_me : | 280 | partition_info_me : partition_info_hi, |
281 | partition_info_hi, | 281 | NUM_PARTITIONS); |
282 | NUM_PARTITIONS); | ||
283 | 282 | ||
284 | nand_evb_init: | 283 | nand_evb_init: |
285 | /**************************** | 284 | /**************************** |
@@ -365,11 +364,10 @@ static int __init ppchameleonevb_init(void) | |||
365 | ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME; | 364 | ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME; |
366 | 365 | ||
367 | /* Register the partitions */ | 366 | /* Register the partitions */ |
368 | mtd_device_parse_register(ppchameleonevb_mtd, NULL, 0, | 367 | mtd_device_parse_register(ppchameleonevb_mtd, NULL, NULL, |
369 | ppchameleon_mtd->size == NAND_SMALL_SIZE ? | 368 | ppchameleon_mtd->size == NAND_SMALL_SIZE ? |
370 | partition_info_me : | 369 | partition_info_me : partition_info_hi, |
371 | partition_info_hi, | 370 | NUM_PARTITIONS); |
372 | NUM_PARTITIONS); | ||
373 | 371 | ||
374 | /* Return happy */ | 372 | /* Return happy */ |
375 | return 0; | 373 | return 0; |