Skip to content

Commit

Permalink
iommu/mediatek: Mark PM functions as __maybe_unused
Browse files Browse the repository at this point in the history
When CONFIG_PM is unset, we get a harmless warning for this driver:

drivers/iommu/mtk_iommu.c:665:12: error: 'mtk_iommu_suspend' defined but not used [-Werror=unused-function]
drivers/iommu/mtk_iommu.c:680:12: error: 'mtk_iommu_resume' defined but not used [-Werror=unused-function]

Marking the functions as __maybe_unused gits rid of the two functions
and lets the compiler silently drop the object code, while still
doing syntax checking on them for build-time verification.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 0df4fab ("iommu/mediatek: Add mt8173 IOMMU driver")
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Arnd Bergmann authored and Joerg Roedel committed Feb 29, 2016
1 parent 1928832 commit fd99f79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iommu/mtk_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -662,7 +662,7 @@ static int mtk_iommu_remove(struct platform_device *pdev)
return 0;
}

static int mtk_iommu_suspend(struct device *dev)
static int __maybe_unused mtk_iommu_suspend(struct device *dev)
{
struct mtk_iommu_data *data = dev_get_drvdata(dev);
struct mtk_iommu_suspend_reg *reg = &data->reg;
Expand All @@ -677,7 +677,7 @@ static int mtk_iommu_suspend(struct device *dev)
return 0;
}

static int mtk_iommu_resume(struct device *dev)
static int __maybe_unused mtk_iommu_resume(struct device *dev)
{
struct mtk_iommu_data *data = dev_get_drvdata(dev);
struct mtk_iommu_suspend_reg *reg = &data->reg;
Expand Down

0 comments on commit fd99f79

Please sign in to comment.