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/ath
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
..
ath5k simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ath6kl simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
ath9k simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
carl9170 simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
Kconfig Merge branch 'for-linus' of git://github.com/richardweinberger/linux 2011-11-02 09:45:39 -07:00
Makefile atheros: force endian checks on atheros wireless drivers 2011-12-21 15:06:12 -05:00
ath.h ath9k: Add wiphy name to log messages. 2012-03-12 14:19:36 -04:00
debug.c drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:08 -04:00
hw.c drivers/net: Add export.h to files using EXPORT_SYMBOL/THIS_MODULE 2011-10-31 19:31:08 -04:00
key.c ath: Convert ath_dbg(bar, ATH_DBG_<FOO>, to ath_dbg(bar, FOO 2011-12-19 14:35:31 -05:00
main.c ath9k: Add wiphy name to log messages. 2012-03-12 14:19:36 -04:00
reg.h
regd.c ath: optimize processing of CTLs for country IEs for world roaming cards 2011-12-13 15:30:59 -05:00
regd.h ath: fix spelling of Grenada 2011-08-08 16:04:13 -04:00
regd_common.h ath: fix spelling of Grenada 2011-08-08 16:04:13 -04:00