linux-stable/drivers/iommu
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
..
amd_iommu.c x86: Fix section warnings 2012-03-19 12:01:01 +01:00
amd_iommu_init.c Merge branches 'iommu/fixes', 'arm/tegra' and 'x86/amd' into next 2012-03-22 19:28:39 +01:00
amd_iommu_proto.h iommu/amd: Add function to get IOMMUv2 domain for pdev 2011-12-12 15:19:05 +01:00
amd_iommu_types.h iommu/amd: Set IOTLB invalidation timeout 2011-12-22 14:56:56 +01:00
amd_iommu_v2.c iommu/amd: Don't initialize IOMMUv2 resources when not required 2012-03-15 12:46:40 +01:00
dmar.c Merge branch 'core-locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2011-10-26 16:17:32 +02:00
intel-iommu.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2012-03-20 21:12:50 -07:00
intr_remapping.c intr_remapping: Fix section mismatch in ir_dev_scope_init() 2011-12-05 18:22:53 +01:00
intr_remapping.h
iommu.c Merge branches 'iommu/page-sizes' and 'iommu/group-id' into next 2012-01-09 13:06:28 +01:00
iova.c
Kconfig ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver 2012-01-26 13:59:02 +01:00
Makefile ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver 2012-01-26 13:59:02 +01:00
msm_iommu.c iommu/msm: Fix error handling in msm_iommu_unmap() 2012-01-30 12:53:14 +01:00
msm_iommu_dev.c
omap-iommu-debug.c simple_open: automatically convert to simple_open() 2012-04-05 15:25:50 -07:00
omap-iommu.c ARM: OMAP: make iommu subsys_initcall to fix builtin omap3isp 2012-02-27 14:18:42 +01:00
omap-iovmm.c Merge branches 'iommu/fixes', 'arm/omap' and 'x86/amd' into next 2012-01-09 13:04:05 +01:00
tegra-gart.c iommu/tegra-gart: fix spin_unlock in map failure path 2012-03-13 11:17:42 +01:00
tegra-smmu.c ARM: IOMMU: Tegra30: Add iommu_ops for SMMU driver 2012-01-26 13:59:02 +01:00