Skip to content

Commit

Permalink
ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected
Browse files Browse the repository at this point in the history
If included without IOMMU_API being selected it will break
compilation:

arch/arm/plat-omap/include/plat/iommu.h:
	In function 'dev_to_omap_iommu':
arch/arm/plat-omap/include/plat/iommu.h:148:
	error: 'struct dev_archdata' has no member named 'iommu'

This will be seen when hwmod includes iommu.h to get the
structure for attributes. Also needed for tidspbridge
incremental migration to use iommu code.

Cc: Tony Lindgren <tony@atomide.com>
Signed-off-by: Omar Ramirez Luna <omar.luna@linaro.org>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
  • Loading branch information
Omar Ramirez Luna authored and Paul Walmsley committed Sep 23, 2012
1 parent 53cce97 commit 7460f14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/arm/plat-omap/include/plat/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ struct omap_iommu_arch_data {
struct omap_iommu *iommu_dev;
};

#ifdef CONFIG_IOMMU_API
/**
* dev_to_omap_iommu() - retrieves an omap iommu object from a user device
* @dev: iommu client device
Expand All @@ -136,6 +137,7 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev)

return arch_data->iommu_dev;
}
#endif

/* IOMMU errors */
#define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)
Expand Down

0 comments on commit 7460f14

Please sign in to comment.