iommu/omap: Move to_iommu definition from omap-iopgtable.h
authorSuman Anna <s-anna@ti.com>
Tue, 18 Mar 2014 01:31:34 +0000 (20:31 -0500)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 16 Apr 2014 14:30:15 +0000 (16:30 +0200)
The to_iommu definition is used only locally to the omap-iommu.c
source file, and it has nothing to do with the page attributes
defined in omap-iopgtable.h. So, move the definition out of
omap-iopgtable.h header file.

Signed-off-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
drivers/iommu/omap-iommu.c
drivers/iommu/omap-iopgtable.h

index 7ce136da9c2d7c6fdc36e1262c3610dd068de021..78f32d13dd66361b24d3d6e2cafa96b6cd63dc6c 100644 (file)
@@ -34,6 +34,9 @@
 #include "omap-iopgtable.h"
 #include "omap-iommu.h"
 
+#define to_iommu(dev)                                                  \
+       ((struct omap_iommu *)platform_get_drvdata(to_platform_device(dev)))
+
 #define for_each_iotlb_cr(obj, n, __i, cr)                             \
        for (__i = 0;                                                   \
             (__i < (n)) && (cr = __iotlb_read_cr((obj), __i), true);   \
index b6f9a51746caad5956442e7d99a1b5450cf72f0b..f891683e3f05af915738151a1a7574268fe84b3b 100644 (file)
@@ -93,6 +93,3 @@ static inline phys_addr_t omap_iommu_translate(u32 d, u32 va, u32 mask)
 /* to find an entry in the second-level page table. */
 #define iopte_index(da)                (((da) >> IOPTE_SHIFT) & (PTRS_PER_IOPTE - 1))
 #define iopte_offset(iopgd, da)        (iopgd_page_vaddr(iopgd) + iopte_index(da))
-
-#define to_iommu(dev)                                                  \
-       (platform_get_drvdata(to_platform_device(dev)))