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/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
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
hid-a4tech.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-cherry.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
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: Add teletext/color keys - gyration remote - EU version (GYAR3101CKDE) 2011-02-15 10:29:57 +01:00
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: adding __init/__exit macros to module init/exit functions 2009-07-23 01:28:01 +02:00
hid-keytouch.c HID: add support for Keytouch IEC 60945 2011-02-17 15:12:45 +01:00
hid-kye.c HID: kye: Add support for 3 tablets 2012-02-28 13:37:12 +01:00
hid-lcpower.c HID: hid-lcpower: fix key mapping 2011-02-13 15:04:51 +01:00
hid-lg.c HID: lg4ff - Add range setting support and sysfs interface 2011-08-04 16:45:55 +02:00
hid-lg.h HID: lg4ff - Fix misleading info in Kconfig 2011-08-04 16:45:55 +02:00
hid-lg2ff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lg3ff.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-lg4ff.c HID: hid-lg4ff: Casting (void *) value returned by kmalloc is useless 2011-11-11 15:09:29 +01:00
hid-lgff.c HID: lg4ff - Move handling of Logitech wheels to lg4ff driver 2011-08-04 16:45:55 +02:00
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: fix horizontal wheel for ms comfort mouse 4500 2011-07-12 10:31:56 +02:00
hid-monterey.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
hid-multitouch.c Merge branch 'upstream' into for-linus 2012-03-20 13:18:05 +01:00
hid-ntrig.c HID: hid-ntrig: init settle and mode check 2011-03-14 13:10:13 +01:00
hid-ortek.c HID: add support for Skycable 0x3f07 wireless presenter 2011-03-21 16:12:23 +01:00
hid-petalynx.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: fix NULL pointer dereference, add range checks 2011-06-13 13:06:23 +02:00
hid-roccat-arvo.h HID: roccat: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
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: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
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: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
hid-roccat-koneplus.c HID: roccat: fix NULL pointer dereference, add range checks 2011-06-13 13:06:23 +02:00
hid-roccat-koneplus.h HID: roccat: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
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: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
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: correction and cleanup of HID feature reports 2011-06-13 12:52:57 +02:00
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: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: hid-sony: fix endiannes of Sixaxis accel/gyro values 2011-06-13 13:21:30 +02:00
hid-speedlink.c HID: Add driver to fix Speedlink VAD Cezanne support 2011-06-08 09:45:37 +02:00
hid-sunplus.c HID: Add and use hid_<level>: dev_<level> equivalents 2010-12-10 15:10:38 +01:00
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: Add support for Perixx PERIBOARD-707 (Plus) 2010-11-25 15:59:02 +01:00
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 HID: zydacron: kfree() NULL pointer cleanup 2011-08-04 23:51:29 +02:00
hidraw.c Merge branch 'upstream' into for-linus 2011-10-25 09:59:04 +02:00