linux/drivers/net/wireless/iwmc3200wifi
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
..
bus.h
cfg80211.c iwmc3200wifi: add some more range checks 2011-11-08 15:53:59 -05:00
cfg80211.h
commands.c drivers/net: Add moduleparam.h to drivers as required. 2011-10-31 19:31:09 -04:00
commands.h
debug.h
debugfs.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
eeprom.c
eeprom.h
fw.c drivers/net: Remove unnecessary semicolons 2011-06-05 14:33:40 -07:00
fw.h
hal.c Fix common misspellings 2011-03-31 11:26:23 -03:00
hal.h
iwm.h
Kconfig
lmac.h
main.c module_param: make bool parameters really bool (net & drivers/net) 2011-12-19 22:27:29 -05:00
Makefile
netdev.c iwmc3200wifi: Return proper error for iwm_if_alloc 2011-01-13 15:46:44 -05:00
rx.c net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
rx.h
sdio.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
sdio.h
trace.c
trace.h iwmc3200wifi: Fix typo in trace.h 2012-02-06 14:53:07 -05:00
tx.c Fix common misspellings 2011-03-31 11:26:23 -03:00
umac.h