linux/drivers/net
Himangi Saraogi 09b38aa1e7 ehea: 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. Also, linux/device.h 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>
Compile-Tested-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2014-05-30 15:40:29 -07:00
..
appletalk
arcnet
bonding Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
caif
can Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
cris
dsa net: dsa: update DSA drivers to use ds_to_priv 2014-04-30 13:31:25 -04:00
ethernet ehea: Introduce the use of the managed version of kzalloc 2014-05-30 15:40:29 -07:00
fddi
hamradio yam: replace del_timer by del_timer_sync 2014-03-27 15:28:06 -04:00
hippi
hyperv hyperv: Add hash value into RNDIS Per-packet info 2014-05-23 14:49:00 -04:00
ieee802154 ieee802154: Introduce the use of the managed version of kzalloc 2014-05-21 16:29:52 -04:00
irda irda: sh_irda: Enable driver compilation with COMPILE_TEST 2014-05-14 15:23:55 -04:00
phy net: of_mdio: add of_mdiobus_link_phydev() 2014-05-29 15:23:29 -07:00
plip
ppp net: filter: let unattached filters use sock_fprog_kern 2014-05-23 16:48:05 -04:00
slip slip: fix spinlock variant 2014-04-27 23:35:12 -04:00
team team: lb: use sizeof(*fprog) in __fprog_create 2014-05-24 17:06:38 -04:00
usb net: cdc_ncm: fix typo in test for supported formats 2014-05-22 15:53:00 -04:00
vmxnet3 net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
wan drivers/net/wan: delete unneeded call to netdev_priv 2014-05-15 16:57:47 -04:00
wimax wimax/i2400m: make return of 0 explicit 2014-05-21 17:16:24 -04:00
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
xen-netback Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
dummy.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
eql.c
ifb.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-29 18:48:54 -04:00
Kconfig netpoll: Remove dead packet receive code (CONFIG_NETPOLL_TRAP) 2014-03-17 15:48:12 -04:00
LICENSE.SRC
loopback.c net: Replace u64_stats_fetch_begin_bh to u64_stats_fetch_begin_irq 2014-03-14 22:41:36 -04:00
macvlan.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-05-24 00:32:30 -04:00
macvtap.c mactap: Fix checksum errors for non-gso packets in bridge mode 2014-04-30 16:12:22 -04:00
Makefile
mdio.c
mii.c
netconsole.c
nlmon.c net: nlmon: flag nlmon devs with LLTX/SG 2014-03-28 16:49:47 -04:00
ntb_netdev.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
rionet.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
sb1000.c
Space.c
sungem_phy.c
tun.c net-tun: restructure tun_do_read for better sleep/wakeup efficiency 2014-05-21 15:50:28 -04:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2014-03-29 18:48:54 -04:00
virtio_net.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
vxlan.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
xen-netfront.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00