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/apple: modern macbook airs use the standard apple function key translations 2011-11-06 18:34:03 -08:00
hid-axff.c hid: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-belkin.c
hid-cherry.c
hid-chicony.c HID: add more hotkeys in Asus AIO keyboards 2012-02-02 10:32:45 +01:00
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 Merge branches 'hyperv', 'multitouch', 'roccat', 'upstream', 'upstream-fixes', 'wacom' and 'wiimote' into for-linus 2012-01-05 15:51:02 +01:00
hid-dr.c hid: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-elecom.c
hid-emsff.c Merge branches 'hyperv', 'multitouch', 'roccat', 'upstream', 'upstream-fixes', 'wacom' and 'wiimote' into for-linus 2012-01-05 15:51:02 +01:00
hid-ezkey.c
hid-gaff.c hid: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-gyration.c
hid-holtekff.c hid: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-hyperv.c HID: hyperv: Properly disconnect the input device 2012-02-02 10:56:11 +01:00
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: hid-lg4ff: Casting (void *) value returned by kmalloc is useless 2011-11-11 15:09:29 +01:00
hid-lg.c
hid-lg.h
hid-lgff.c
hid-logitech-dj.c HID: logitech: fix mask to enable DJ mode 2012-02-02 10:54:14 +01:00
hid-logitech-dj.h HID: hid-logitech-dj: fix off by one 2011-09-20 16:09:22 +02:00
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 misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
hid-primax.c HID: support primax keyboards violating USB HID spec 2011-10-17 17:04:41 +02:00
hid-prodikeys.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
hid-roccat-arvo.c
hid-roccat-arvo.h
hid-roccat-common.c Merge branches 'hyperv', 'multitouch', 'roccat', 'upstream', 'upstream-fixes', 'wacom' and 'wiimote' into for-linus 2012-01-05 15:51:02 +01:00
hid-roccat-common.h
hid-roccat-isku.c HID: roccat: Add support for Isku keyboard 2011-12-06 10:21:10 +01:00
hid-roccat-isku.h HID: roccat: Add support for Isku keyboard 2011-12-06 10:21:10 +01:00
hid-roccat-kone.c HID: roccat: Use kmemdup rather than duplicating its implementation 2011-11-20 00:42:42 +01:00
hid-roccat-kone.h
hid-roccat-koneplus.c
hid-roccat-koneplus.h
hid-roccat-kovaplus.c HID: roccat: Kovaplus now reports external profile changes via roccat device 2011-09-07 13:38:27 +02:00
hid-roccat-kovaplus.h
hid-roccat-pyra.c HID: roccat: Pyra now reports external profile changes via roccat device 2011-09-07 13:38:27 +02:00
hid-roccat-pyra.h
hid-roccat.c Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
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: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-topseed.c
hid-twinhan.c misc latin1 to utf8 conversions 2012-01-02 13:04:55 +01:00
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: Parse classic controller data 2011-11-22 23:10:10 +01:00
hid-wiimote.h HID: wiimote: Allow direct DRM debug access 2011-11-22 23:11:10 +01:00
hid-zpff.c hid: Add module.h to fix up implicit users of it 2011-10-31 19:31:17 -04:00
hid-zydacron.c
hidraw.c Merge branch 'upstream' into for-linus 2011-10-25 09:59:04 +02:00
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