linux-stable/include/linux/omap-iommu.h
Joerg Roedel 73499ad21d iommu/omap: Fix compilation warnings
A recent patch introduced a new compiler warning because
two functions with non-void return type have no return
statement in omap-iommu.h for CONFIG_OMAP_IOMMU=n.

Fix this by adding return statements to these functions.

Fixes: d9c4d8a6cc ('iommu/omap: introduce new API for runtime suspend/resume control')
Signed-off-by: Joerg Roedel <jroedel@suse.de>
2019-08-09 19:56:05 +02:00

36 lines
880 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* omap iommu: simple virtual address space management
*
* Copyright (C) 2008-2009 Nokia Corporation
*
* Written by Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
*/
#ifndef _OMAP_IOMMU_H_
#define _OMAP_IOMMU_H_
struct iommu_domain;
#ifdef CONFIG_OMAP_IOMMU
extern void omap_iommu_save_ctx(struct device *dev);
extern void omap_iommu_restore_ctx(struct device *dev);
int omap_iommu_domain_deactivate(struct iommu_domain *domain);
int omap_iommu_domain_activate(struct iommu_domain *domain);
#else
static inline void omap_iommu_save_ctx(struct device *dev) {}
static inline void omap_iommu_restore_ctx(struct device *dev) {}
static inline int omap_iommu_domain_deactivate(struct iommu_domain *domain)
{
return -ENODEV;
}
static inline int omap_iommu_domain_activate(struct iommu_domain *domain)
{
return -ENODEV;
}
#endif
#endif