summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/spear_smi.c
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-03-09 18:24:26 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-27 01:53:20 +0200
commit42d7fbe223ab878b23de9e3b0166f8cd665a2aa5 (patch)
tree844f3b407e7cc7b335899909b81811e1369dcdef /drivers/mtd/devices/spear_smi.c
parentmtd: maps: sa1100-flash: Add reference counter to set_vpp() (diff)
downloadlinux-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/devices/spear_smi.c')
-rw-r--r--drivers/mtd/devices/spear_smi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c
index f45dd37b771e..f2016b5f59b6 100644
--- a/drivers/mtd/devices/spear_smi.c
+++ b/drivers/mtd/devices/spear_smi.c
@@ -851,7 +851,7 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank)
goto err_map;
}
}
- ret = mtd_device_parse_register(&flash->mtd, NULL, 0, parts, count);
+ ret = mtd_device_parse_register(&flash->mtd, NULL, NULL, parts, count);
if (ret)
dev_err(&dev->pdev->dev, "Err MTD partition=%d\n", ret);