android_kernel_motorola_sm6225/drivers/acpi
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
..
acpica Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2012-01-18 15:51:48 -08:00
apei Use acpi_os_map_memory() instead of ioremap() in einj driver 2012-01-23 19:39:10 -05:00
ac.c treewide: fix potentially dangerous trailing ';' in #defined values/expressions 2011-07-21 14:10:00 +02:00
acpi_ipmi.c
acpi_memhotplug.c
acpi_pad.c
battery.c switch procfs to umode_t use 2012-01-03 22:54:56 -05:00
blacklist.c acpi: delete module.h include from files explicitly not needing it 2011-10-31 19:30:33 -04:00
bus.c ACPI: Drop ACPI_NO_HARDWARE_INIT 2011-11-06 20:32:31 -05:00
button.c
cm_sbs.c
container.c
custom_method.c ACPI: Split out custom_method functionality into an own driver 2011-05-29 01:50:40 -04:00
debugfs.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
dock.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
ec.c Merge branch 'ec-cleanup' into release 2011-05-29 04:40:39 -04:00
ec_sys.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
event.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
fan.c ACPI: constify ops structs 2011-07-16 18:36:17 -04:00
glue.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
hed.c
internal.h ACPI: Cleanup custom_method debug stuff 2011-05-29 01:50:04 -04:00
Kconfig Kconfig: acpi: Fix typo in comment. 2012-01-04 11:47:45 +01:00
Makefile ACPI: Remove ./drivers/acpi/atomicio.[ch] 2012-01-21 01:09:00 -05:00
numa.c ACPI: Store SRAT table revision 2012-01-17 04:19:04 -05:00
nvs.c ACPI, Record ACPI NVS regions 2012-01-17 03:54:44 -05:00
osl.c ACPI, APEI: Add RAM mapping support to ACPI 2012-01-21 01:08:38 -05:00
pci_bind.c
pci_irq.c PCI/PM/Runtime: make PCI traces quieter 2012-01-06 12:11:16 -08:00
pci_link.c
pci_root.c PCI: Rework ASPM disable code 2012-01-06 12:10:26 -08:00
pci_slot.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
power.c
proc.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
processor_core.c ACPI: processor: fix acpi_get_cpuid for UP processor 2012-01-17 05:25:08 -05:00
processor_driver.c ACPI: remove duplicated lines of merging problems with acpi_processor_start 2012-02-08 16:17:10 -08:00
processor_idle.c ACPI / cpuidle: Remove acpi_idle_suspend (to fix suspend regression) 2011-11-12 21:30:14 -02:00
processor_perflib.c ACPI: Load acpi-cpufreq from processor driver automatically 2012-01-26 16:48:12 -08:00
processor_thermal.c cpu: convert 'cpu' and 'machinecheck' sysdev_class to a regular subsystem 2011-12-21 14:29:42 -08:00
processor_throttling.c
reboot.c
sbs.c Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6 2011-08-02 21:17:02 -10:00
sbshc.c acpi: add module.h to files implicitly using/relying on it. 2011-10-31 19:30:32 -04:00
sbshc.h
scan.c ACPI: use kstrdup() 2011-11-06 19:13:44 -05:00
sleep.c ACPI / PM: Add Sony Vaio VPCCW29FX to nonvs blacklist. 2012-01-21 01:29:50 -05:00
sleep.h
sysfs.c ACPI: Export FADT pm_profile integer value to userspace 2011-11-06 20:48:42 -05:00
tables.c
thermal.c ACPI: constify ops structs 2011-07-16 18:36:17 -04:00
utils.c
video.c module_param: make bool parameters really bool (drivers & misc) 2012-01-13 09:32:20 +10:30
video_detect.c acpi: add export.h to files using THIS_MODULE/EXPORT_SYMBOL 2011-10-31 19:30:34 -04:00
wakeup.c