OSDN Git Service

media: omap: omap-iommu.h: allow building drivers with COMPILE_TEST
authorMauro Carvalho Chehab <mchehab@s-opensource.com>
Thu, 5 Apr 2018 14:54:14 +0000 (10:54 -0400)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Fri, 20 Apr 2018 14:47:33 +0000 (10:47 -0400)
Drivers that depend on omap-iommu.h (currently, just omap3isp)
need a stub implementation in order to be built with COMPILE_TEST.

Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
include/linux/omap-iommu.h

index c1aede4..ce1b7c6 100644 (file)
 #ifndef _OMAP_IOMMU_H_
 #define _OMAP_IOMMU_H_
 
+#ifdef CONFIG_OMAP_IOMMU
 extern void omap_iommu_save_ctx(struct device *dev);
 extern void omap_iommu_restore_ctx(struct device *dev);
+#else
+static inline void omap_iommu_save_ctx(struct device *dev) {}
+static inline void omap_iommu_restore_ctx(struct device *dev) {}
+#endif
 
 #endif