linux/drivers/hid
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
..
usbhid Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00
hid-a4tech.c
hid-apple.c
hid-axff.c
hid-belkin.c
hid-cherry.c
hid-chicony.c
hid-core.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-03-23 14:39:09 -07:00
hid-cypress.c
hid-debug.c
hid-dr.c
hid-elecom.c
hid-emsff.c
hid-ezkey.c
hid-gaff.c
hid-gyration.c
hid-holtekff.c
hid-hyperv.c
hid-ids.h Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-03-23 14:39:09 -07:00
hid-input.c Merge branches 'battery-scope', 'logitech' and 'multitouch' into for-linus 2012-03-20 13:04:25 +01:00
hid-kensington.c
hid-keytouch.c
hid-kye.c HID: kye: Add support for 3 tablets 2012-02-28 13:37:12 +01:00
hid-lcpower.c
hid-lg2ff.c
hid-lg3ff.c
hid-lg4ff.c
hid-lg.c
hid-lg.h
hid-lgff.c
hid-logitech-dj.c
hid-logitech-dj.h
hid-magicmouse.c HID: hid-magicmouse: Add pointer and buttonpad properties for Magic Trackpad 2012-02-21 11:52:20 +01:00
hid-microsoft.c
hid-monterey.c
hid-multitouch.c Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00
hid-ntrig.c
hid-ortek.c
hid-petalynx.c
hid-picolcd.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
hid-pl.c
hid-primax.c
hid-prodikeys.c
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c
hid-roccat-common.h
hid-roccat-isku.c
hid-roccat-isku.h
hid-roccat-kone.c
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-kovaplus.c
hid-roccat-kovaplus.h
hid-roccat-pyra.c
hid-roccat-pyra.h
hid-roccat.c
hid-saitek.c HID: add new driver for non-compliant Saitek devices 2012-02-22 11:30:17 +01:00
hid-samsung.c
hid-sjoy.c HID: sjoy: Add device ID for Super Joy Box 3 2012-02-21 14:16:36 +01:00
hid-sony.c
hid-speedlink.c
hid-sunplus.c
hid-tivo.c HID: tivo: add support for BT-version (0x1200) 2012-03-13 09:36:05 +01:00
hid-tmff.c
hid-topseed.c
hid-twinhan.c
hid-uclogic.c HID: uclogic: Replace original rdescs with links 2012-03-06 11:20:54 +01:00
hid-wacom.c Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00
hid-waltop.c HID: waltop: Add support for tablet with PID 0038 2012-03-06 11:20:55 +01:00
hid-wiimote-core.c HID: wiimote: fix invalid power_supply_powers call 2012-02-07 13:40:56 +01:00
hid-wiimote-debug.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
hid-wiimote-ext.c
hid-wiimote.h
hid-zpff.c
hid-zydacron.c
hidraw.c
Kconfig Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00
Makefile Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00