linux/drivers/net
Stephen Boyd 234e340582 simple_open: automatically convert to simple_open()
Many users of debugfs copy the implementation of default_open() when
they want to support a custom read/write function op.  This leads to a
proliferation of the default_open() implementation across the entire
tree.

Now that the common implementation has been consolidated into libfs we
can replace all the users of this function with simple_open().

This replacement was done with the following semantic patch:

<smpl>
@ open @
identifier open_f != simple_open;
identifier i, f;
@@
-int open_f(struct inode *i, struct file *f)
-{
(
-if (i->i_private)
-f->private_data = i->i_private;
|
-f->private_data = i->i_private;
)
-return 0;
-}

@ has_open depends on open @
identifier fops;
identifier open.open_f;
@@
struct file_operations fops = {
...
-.open = open_f,
+.open = simple_open,
...
};
</smpl>

[akpm@linux-foundation.org: checkpatch fixes]
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-04-05 15:25:50 -07:00
..
appletalk
arcnet
bonding bonding: remove entries for master_ip and vlan_ip and query devices instead 2012-03-22 22:36:17 -04:00
caif simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
can can: peak_usb: PCAN-USB specific part: fix little endian usage 2012-03-07 15:51:01 +01:00
cris
dsa
ethernet simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
fddi
hamradio
hippi
hyperv net/hyperv: Fix the code handling tx busy 2012-03-19 17:27:06 -04:00
irda Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
phy Generialize powerpc's irq_host as irq_domain 2012-03-21 10:27:19 -07:00
plip
ppp ppp: Replace uses of <linux/if_ppp.h> with <linux/ppp-ioctl.h> 2012-03-04 20:41:38 -05:00
slip
team
tokenring
usb net: add a truesize parameter to skb_add_rx_frag() 2012-03-25 13:29:58 -04:00
vmxnet3 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-05 21:16:26 -05:00
wan Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2012-03-20 21:04:47 -07:00
wimax simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
wireless simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
xen-netback
dummy.c
eql.c
ifb.c
Kconfig
LICENSE.SRC
loopback.c
macvlan.c
macvtap.c
Makefile
mdio.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
mii.c ethtool, mdio, mii: Specify MDIO information fields in struct ethtool_cmd 2012-03-01 16:41:26 -05:00
netconsole.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tun.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
veth.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-02-19 16:03:15 -05:00
virtio_net.c
xen-netfront.c One tiny feature that accidentally got lost in the initial git pull: 2012-03-24 12:20:25 -07:00