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/bluetooth
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
..
Kconfig Bluetooth: btmrvl: support Marvell Bluetooth device SD8797 2011-11-21 13:52:31 -02:00
Makefile Bluetooth: btwilink driver 2011-02-23 14:39:10 -08:00
ath3k.c Bluetooth: Adding USB device 13d3:3375 as an Atheros AR3012. 2012-03-08 02:16:24 -03:00
bcm203x.c USB: convert drivers/bluetooth/* to use module_usb_driver() 2011-11-18 09:47:34 -08:00
bfusb.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
bluecard_cs.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
bpa10x.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
bt3c_cs.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
btmrvl_debugfs.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
btmrvl_drv.h Bluetooth: Use __packed annotation for drivers 2010-07-21 10:39:13 -07:00
btmrvl_main.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
btmrvl_sdio.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem 2011-12-09 14:07:12 -05:00
btmrvl_sdio.h Bluetooth: btmrvl: support Marvell Bluetooth device SD8787 2011-04-13 12:20:05 -03:00
btsdio.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
btuart_cs.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
btusb.c Bluetooth: Adding USB device 13d3:3375 as an Atheros AR3012. 2012-03-08 02:16:24 -03:00
btwilink.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
dtl1_cs.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00
hci_ath.c Bluetooth: hci-uart-ath: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_bcsp.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next.git 2012-02-16 14:25:34 +02:00
hci_h4.c Bluetooth: hci-uart-h4: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_ldisc.c Bluetooth: Add support for creating HCI UART based AMP controllers 2012-02-24 20:15:34 +02:00
hci_ll.c Bluetooth: hci-uart-ll: Use GFP_ATOMIC in open() 2012-02-13 17:01:22 +02:00
hci_uart.h Bluetooth: Add support for creating HCI UART based AMP controllers 2012-02-24 20:15:34 +02:00
hci_vhci.c Bluetooth: Remove hci_dev->driver_data 2012-02-13 17:01:37 +02:00