linux/drivers/net/wimax/i2400m
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
..
control.c drivers/net: Add moduleparam.h to drivers as required. 2011-10-31 19:31:09 -04:00
debug-levels.h
debugfs.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
driver.c Fix common misspellings 2011-03-31 11:26:23 -03:00
fw.c drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:08 -04:00
i2400m-sdio.h wimax: make functions local 2010-10-05 00:47:38 -07:00
i2400m-usb.h Fix common misspellings 2011-03-31 11:26:23 -03:00
i2400m.h treewide: Fix typos in various parts of the kernel, and fix some comments. 2011-12-02 14:57:31 +01:00
Kconfig
Makefile
netdev.c wimax/i2400m: fix erroneous NETDEV_TX_BUSY use 2012-03-16 02:01:41 -07:00
op-rfkill.c Fix common misspellings 2011-03-31 11:26:23 -03:00
rx.c drivers/net: Add moduleparam.h to drivers as required. 2011-10-31 19:31:09 -04:00
sdio-debug-levels.h
sdio-fw.c
sdio-rx.c wimax: make functions local 2010-10-05 00:47:38 -07:00
sdio-tx.c wimax/i2400m: add the error recovery mechanism on TX path 2010-05-11 14:05:39 -07:00
sdio.c drivers/net: Add module.h to drivers who were implicitly using it 2011-10-31 19:31:07 -04:00
sysfs.c
tx.c net: fix assignment of 0/1 to bool variables. 2011-12-19 22:27:29 -05:00
usb-debug-levels.h
usb-fw.c Fix common misspellings 2011-03-31 11:26:23 -03:00
usb-notif.c drivers/net: Remove unnecessary returns from void function()s 2010-05-14 00:19:28 -07:00
usb-rx.c Fix common misspellings 2011-03-31 11:26:23 -03:00
usb-tx.c wimax/i2400m: remove an unused variable 2011-12-16 15:57:03 -05:00
usb.c drivers/net: Add module.h to drivers who were implicitly using it 2011-10-31 19:31:07 -04:00