diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-03-09 18:24:26 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-03-27 01:53:20 +0200 |
commit | 42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (patch) | |
tree | 844f3b407e7cc7b335899909b81811e1369dcdef /drivers/mtd/nand/orion_nand.c | |
parent | mtd: maps: sa1100-flash: Add reference counter to set_vpp() (diff) | |
download | linux-42d7fbe223ab878b23de9e3b0166f8cd665a2aa5.tar.xz linux-42d7fbe223ab878b23de9e3b0166f8cd665a2aa5.zip |
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/orion_nand.c')
-rw-r--r-- | drivers/mtd/nand/orion_nand.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/nand/orion_nand.c b/drivers/mtd/nand/orion_nand.c index 29f505adaf84..1d3bfb26080c 100644 --- a/drivers/mtd/nand/orion_nand.c +++ b/drivers/mtd/nand/orion_nand.c @@ -129,8 +129,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) } mtd->name = "orion_nand"; - ret = mtd_device_parse_register(mtd, NULL, 0, - board->parts, board->nr_parts); + ret = mtd_device_parse_register(mtd, NULL, NULL, board->parts, + board->nr_parts); if (ret) { nand_release(mtd); goto no_dev; |