alistair23-linux/drivers/mtd/ubi
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
..
build.c UBI: rename peb_buf1 to peb_buf 2012-03-09 09:39:31 +02:00
cdev.c UBI: fix nameless volumes handling 2012-01-15 15:06:08 +02:00
debug.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
debug.h UBI: fix debugging messages 2012-01-11 18:35:53 +02:00
eba.c UBI: rename MOVE_CANCEL_BITFLIPS to MOVE_TARGET_BITFLIPS 2012-03-09 10:31:18 +02:00
gluebi.c
io.c UBI: rename peb_buf1 to peb_buf 2012-03-09 09:39:31 +02:00
kapi.c mtd: do not use mtd->sync directly 2012-01-09 18:26:21 +00:00
Kconfig
Makefile
misc.c mtd: utilize `mtd_is_*()' functions 2011-09-21 09:19:06 +03:00
scan.c UBI: rename peb_buf1 to peb_buf 2012-03-09 09:39:31 +02:00
scan.h
ubi-media.h
ubi.h UBI: rename MOVE_CANCEL_BITFLIPS to MOVE_TARGET_BITFLIPS 2012-03-09 10:31:18 +02:00
upd.c
vmt.c mtd: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed 2011-10-31 19:31:11 -04:00
vtbl.c UBI: use own macros for the layout volume 2012-01-15 15:08:55 +02:00
wl.c UBI: rename MOVE_CANCEL_BITFLIPS to MOVE_TARGET_BITFLIPS 2012-03-09 10:31:18 +02:00