kernel-fxtec-pro1x/drivers/net/ieee802154
Himangi Saraogi 12b5c38f2d ieee802154: Introduce the use of the managed version of kzalloc
This patch moves data allocated using kzalloc to managed data allocated
using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
functions. An explicit linux/device.h include is added to make sure
the devm_*() routine declarations are unambiguously available.

The following Coccinelle semantic patch was used for making the change:

@platform@
identifier p, probefn, removefn;
@@
struct platform_driver p = {
  .probe = probefn,
  .remove = removefn,
};

@prb@
identifier platform.probefn, pdev;
expression e, e1, e2;
@@
probefn(struct platform_device *pdev, ...) {
  <+...
- e = kzalloc(e1, e2)
+ e = devm_kzalloc(&pdev->dev, e1, e2)
  ...
?-kfree(e);
  ...+>
}

@rem depends on prb@
identifier platform.removefn;
expression e;
@@
removefn(...) {
  <...
- kfree(e);
  ...>
}

Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-21 16:29:52 -04:00
..
at86rf230.c at86rf230: remove function for setting irq polarity 2014-04-26 12:20:35 -04:00
fakehard.c ieee802154: use ieee802154_addr instead of *_sa variants 2014-03-14 22:15:26 -04:00
fakelb.c ieee802154: Introduce the use of the managed version of kzalloc 2014-05-21 16:29:52 -04:00
Kconfig ieee802154: at86rf230: add support for rf233 chip 2014-03-12 00:05:36 -04:00
Makefile
mrf24j40.c ieee802154: enforce consistent endianness in the 802.15.4 stack 2014-03-14 22:15:26 -04:00