powerpc/iommu: Use permission-specific DEVICE_ATTR variants
authorJulia Lawall <Julia.Lawall@lip6.fr>
Sat, 29 Oct 2016 19:37:02 +0000 (21:37 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 1 Sep 2017 06:42:54 +0000 (16:42 +1000)
Use DEVICE_ATTR_RW for read-write attributes.  This simplifies the
source code, improves readbility, and reduces the chance of
inconsistencies.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/iommu.c

index e0af6cd7ba4f7cef79dcd0e643230188ebf42ee2..af7a20dc6e0934e0945c95e21c7b1eb07e11fdd1 100644 (file)
@@ -127,8 +127,7 @@ static ssize_t fail_iommu_store(struct device *dev,
        return count;
 }
 
-static DEVICE_ATTR(fail_iommu, S_IRUGO|S_IWUSR, fail_iommu_show,
-                  fail_iommu_store);
+static DEVICE_ATTR_RW(fail_iommu);
 
 static int fail_iommu_bus_notify(struct notifier_block *nb,
                                 unsigned long action, void *data)