]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mtd: spear_smi: use devm_ functions consistently
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 4 Aug 2012 20:36:38 +0000 (22:36 +0200)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Sat, 25 Aug 2012 11:33:55 +0000 (14:33 +0300)
commit981da2befae79f742f802243728de136b5e96348
tree4946cc209ba2660745b62b4a3b11a36629760c5c
parent5100a1fd3e6af57044b90c5971459c3bce118c20
mtd: spear_smi: use devm_ functions consistently

Use devm_kzalloc for all calls to kzalloc and not just the first.  Use devm
functions for other allocations as well.

Move the call to platform_get_resource(pdev, IORESOURCE_MEM, 0) closer to
where its result is passed to devm_request_and_ioremap to make the lack of
need for a NULL test more evident.

The semantic match that finds the inconsistency is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

*devm_kzalloc(...)
...
*kzalloc(...)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
drivers/mtd/devices/spear_smi.c