kernel-ark/arch/arm
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
..
boot ARM: device tree work 2012-03-27 16:47:35 -07:00
common Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
configs ARM: driver specific updates 2012-03-27 16:41:24 -07:00
include/asm Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
kernel smp: introduce a generic on_each_cpu_mask() function 2012-03-28 17:14:35 -07:00
lib
mach-at91 ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-bcmring Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-clps711x
mach-cns3xxx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-davinci ARM: global cleanups 2012-03-27 16:03:32 -07:00
mach-dove Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ebsa110 Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-ep93xx Merge tag 'asoc-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into next/boards 2012-03-27 15:18:19 -07:00
mach-exynos ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-footbridge Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-gemini
mach-h720x
mach-highbank ARM: SoC specific updates 2012-03-27 16:14:44 -07:00
mach-imx ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-integrator Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-iop13xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-iop32x
mach-iop33x
mach-ixp4xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ixp23xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-ixp2000 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-kirkwood ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-ks8695 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-l7200/include/mach
mach-lpc32xx ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-mmp ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-msm simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
mach-mv78xx0 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-mxs ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-netx
mach-nomadik Merge branch 'tegra/cleanups' into next/timer 2012-03-21 14:27:34 +00:00
mach-omap1 ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-omap2 ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-orion5x Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-picoxcell
mach-pnx4008
mach-prima2 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-pxa Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-realview ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-rpc Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-s3c24xx ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-s3c64xx ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-s3c2410 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s3c2412 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s3c2440 Merge branch 'next/fixes-non-critical' into next/drivers 2012-03-20 22:42:24 +00:00
mach-s5p64x0 Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-s5pc100 Merge branch 'next/cleanup-use-static' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup 2012-03-07 14:45:28 -08:00
mach-s5pv210 ARM: board specific updates 2012-03-27 16:27:28 -07:00
mach-sa1100 Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
mach-shark
mach-shmobile ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-spear3xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-spear6xx
mach-tegra ARM: driver specific updates 2012-03-27 16:41:24 -07:00
mach-u300 Merge tag 'regulator-3.4' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator into next/drivers 2012-03-24 11:29:58 +00:00
mach-ux500 ARM: timer cleanup work 2012-03-27 16:06:17 -07:00
mach-versatile Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
mach-vexpress ARM: device tree work 2012-03-27 16:47:35 -07:00
mach-vt8500
mach-w90x900
mach-zynq
mm Merge branch 'linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci 2012-03-23 14:02:12 -07:00
nwfpe
oprofile
plat-iop
plat-mxc ARM: device tree work 2012-03-27 16:47:35 -07:00
plat-nomadik
plat-omap ARM: device tree work 2012-03-27 16:47:35 -07:00
plat-orion
plat-pxa
plat-s3c24xx Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
plat-s5p Merge branch 'samsung/cleanup-exynos-clock' into next/soc 2012-03-20 10:07:48 +00:00
plat-samsung ARM: driver specific updates 2012-03-27 16:41:24 -07:00
plat-spear Merge branch 'for-armsoc' of git://git.linaro.org/people/rmk/linux-arm 2012-03-23 17:30:49 -07:00
plat-versatile ARM: plat-versatile: convert to twd_local_timer_register() interface 2012-03-13 13:29:58 +00:00
tools
vfp
Kconfig Merge branch 'platforms' of git://git.linaro.org/people/rmk/linux-arm 2012-03-27 18:17:02 -07:00
Kconfig-nommu
Kconfig.debug
Makefile Merge branch 'topic/cleanup-s3c24xx' into next/cleanup-s3c24xx 2012-03-07 01:36:33 -08:00