linux/drivers/tty/serial
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
..
8250 serial: remove back and forth conversions in serial_out_sync 2012-03-09 12:47:56 -08:00
cpm_uart
jsm jsm: Fixed EEH recovery error 2012-01-24 12:55:36 -08:00
21285.c serial: Kill off NO_IRQ 2012-01-26 17:14:50 -08:00
68328serial.c TTY: remove unneeded tty->index checks 2012-03-08 11:42:21 -08:00
68328serial.h
altera_jtaguart.c
altera_uart.c tty: serial: altera_uart: Add CONSOLE_POLL support 2012-02-09 09:04:24 -08:00
amba-pl010.c
amba-pl011.c serial: PL011: clear pending interrupts 2012-03-14 12:27:39 -07:00
apbuart.c
apbuart.h
ar933x_uart.c
atmel_serial.c Atmel: move console default platform_device to serial driver 2012-02-23 14:57:59 +01:00
bcm63xx_uart.c
bfin_sport_uart.c
bfin_sport_uart.h
bfin_uart.c serial: bfin-uart: Don't access tty circular buffer in TX DMA interrupt after it is reset. 2012-03-13 14:33:39 -07:00
clps711x.c
crisv10.c TTY: remove unneeded tty->index checks 2012-03-08 11:42:21 -08:00
crisv10.h
dz.c
dz.h
efm32-uart.c serial/efm32: add new driver 2012-01-26 11:29:47 -08:00
icom.c
icom.h
ifx6x60.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
ifx6x60.h
imx.c serial: imx: add clk_prepare/clk_unprepare 2012-02-01 14:29:31 +01:00
ioc3_serial.c
ioc4_serial.c TTY: remove serialP.h inclusion from some files 2012-03-08 11:47:02 -08:00
ip22zilog.c
ip22zilog.h
Kconfig Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2012-03-21 18:55:10 -07:00
kgdboc.c
lantiq.c
m32r_sio_reg.h m32r: relocate drivers back out of 8250 dir 2012-02-08 15:04:32 -08:00
m32r_sio.c TTY: remove serialP.h inclusion from some files 2012-03-08 11:47:02 -08:00
m32r_sio.h TTY: serial, include pci.h in m32r_sio 2012-03-08 11:47:02 -08:00
Makefile Merge tag 'tty-3.3-rc3' tty-next 2012-02-10 10:25:27 -08:00
max3100.c
max3107.c
max3107.h
mcf.c
mfd.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
mpc52xx_uart.c mpc5200b/uart: select more tolerant uart prescaler on low baudrates 2012-03-08 13:15:50 -08:00
mpsc.c
mrst_max3110.c
mrst_max3110.h
msm_serial_hs.c
msm_serial.c
msm_serial.h
msm_smd_tty.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
mux.c tty/serial/mux.c: linux/tty.h included twice 2012-02-24 13:50:45 -08:00
mxs-auart.c
netx-serial.c
nwpserial.c
of_serial.c
omap-serial.c tty: serial: OMAP: Fix oops due to NULL pdata in DT boot 2012-03-08 10:56:44 -08:00
pch_uart.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
pmac_zilog.c serial: Kill off NO_IRQ 2012-01-26 17:14:50 -08:00
pmac_zilog.h
pnx8xxx_uart.c
pxa.c ARM: device tree work 2012-03-27 16:47:35 -07:00
sa1100.c ARM: 7342/2: sa1100: prepare for sparse irq conversion 2012-03-25 23:57:20 +01:00
samsung.c serial: samsung: fix s3c2442 platform data 2012-02-24 13:50:46 -08:00
samsung.h
sb1250-duart.c
sc26xx.c
serial_core.c TTY: remove re-assignments to tty_driver members 2012-03-08 11:37:58 -08:00
serial_ks8695.c
serial_txx9.c
sh-sci.c sh-sci / PM: Avoid deadlocking runtime PM 2012-03-09 12:59:44 +09:00
sh-sci.h
sirfsoc_uart.c pinctrl: API changes to support multiple states per device 2012-03-05 11:22:59 +01:00
sirfsoc_uart.h serial/sirf: fixup for changes to pin control 2012-02-22 17:59:12 +01:00
sn_console.c Miscellaneous Itanium patches 2012-03-23 17:19:37 -07:00
suncore.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunhv.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunsab.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunsab.h
sunsu.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunzilog.c tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.h 2012-02-10 10:44:35 -08:00
sunzilog.h
timbuart.c
timbuart.h
uartlite.c
ucc_uart.c serial: Kill off NO_IRQ 2012-01-26 17:14:50 -08:00
vr41xx_siu.c serial: Kill off NO_IRQ 2012-01-26 17:14:50 -08:00
vt8500_serial.c tty: serial: vt8500: fix annotations for probe/remove 2012-03-12 10:21:55 -07:00
xilinx_uartps.c
zs.c
zs.h