234e340582
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> |
||
---|---|---|
.. | ||
iwl-1000.c | ||
iwl-2000.c | ||
iwl-5000.c | ||
iwl-6000.c | ||
iwl-agn-calib.c | ||
iwl-agn-calib.h | ||
iwl-agn-hw.h | ||
iwl-agn-lib.c | ||
iwl-agn-rs.c | ||
iwl-agn-rs.h | ||
iwl-agn-rx.c | ||
iwl-agn-rxon.c | ||
iwl-agn-sta.c | ||
iwl-agn-tt.c | ||
iwl-agn-tt.h | ||
iwl-agn-tx.c | ||
iwl-agn.c | ||
iwl-agn.h | ||
iwl-cfg.h | ||
iwl-commands.h | ||
iwl-core.c | ||
iwl-core.h | ||
iwl-csr.h | ||
iwl-debug.c | ||
iwl-debug.h | ||
iwl-debugfs.c | ||
iwl-dev.h | ||
iwl-devtrace.c | ||
iwl-devtrace.h | ||
iwl-drv.c | ||
iwl-drv.h | ||
iwl-eeprom.c | ||
iwl-eeprom.h | ||
iwl-fh.h | ||
iwl-fw-file.h | ||
iwl-fw.h | ||
iwl-io.c | ||
iwl-io.h | ||
iwl-led.c | ||
iwl-led.h | ||
iwl-mac80211.c | ||
iwl-notif-wait.c | ||
iwl-notif-wait.h | ||
iwl-op-mode.h | ||
iwl-pci.c | ||
iwl-power.c | ||
iwl-power.h | ||
iwl-prph.h | ||
iwl-scan.c | ||
iwl-shared.h | ||
iwl-testmode.c | ||
iwl-testmode.h | ||
iwl-trans-pcie-int.h | ||
iwl-trans-pcie-rx.c | ||
iwl-trans-pcie-tx.c | ||
iwl-trans-pcie.c | ||
iwl-trans.h | ||
iwl-ucode.c | ||
Kconfig | ||
Makefile |