dect
/
linux-2.6
Archived
13
0
Fork 0
This repository has been archived on 2022-02-17. You can view files and clone it, but cannot push or open issues or pull requests.
linux-2.6/drivers/net/wireless
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
..
ath simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
b43 simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
b43legacy simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
brcm80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-03-16 13:45:25 -04:00
hostap Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
ipw2x00 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-03-16 13:45:25 -04:00
iwlegacy simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
iwlwifi simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
iwmc3200wifi simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
libertas simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
libertas_tf drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
mwifiex simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
orinoco Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-02-06 14:26:39 -05:00
p54 p54pci: use new driver.pm interface for suspend/resume 2012-03-06 15:16:06 -05:00
prism54 drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages 2012-01-31 16:20:21 -05:00
rt2x00 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-03-18 23:29:41 -04:00
rtl818x rtl8187: Add AD-HOC support 2012-03-07 13:56:37 -05:00
rtlwifi rtlwifi: Remove unused ETH_ADDR_LEN defines 2012-03-19 16:53:09 -04:00
wl12xx simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
wl1251 simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
zd1211rw Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
Kconfig
Makefile
adm8211.c
adm8211.h
airo.c airo: fix test for FLAG_RADIO_DOWN 2012-03-06 15:16:07 -05:00
airo.h
airo_cs.c
at76c50x-usb.c
at76c50x-usb.h
atmel.c drivers/net: Remove alloc_etherdev error messages 2012-01-31 16:20:48 -05:00
atmel.h
atmel_cs.c
atmel_pci.c
mac80211_hwsim.c mac80211_hwsim: Fix set mactime on receiver hwsim radio 2012-03-12 14:19:35 -04:00
mac80211_hwsim.h
mwl8k.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-02-21 15:06:35 -05:00
ray_cs.c
ray_cs.h
rayctl.h
rndis_wlan.c rndis_wlan: use u8 for key indexes 2012-03-05 15:23:17 -05:00
wl3501.h
wl3501_cs.c
zd1201.c
zd1201.h