summaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2015-04-26 11:53:54 +0200
committerVinod Koul <vinod.koul@intel.com>2015-04-27 08:36:02 +0530
commit8ad31bf45db1c4a8f400cbc10400ce9fc0bed227 (patch)
tree8d0a0480b704243c9e5a87134d1b26de77b69c5c /drivers/dma
parentb787f68c36d49bb1d9236f403813641efa74a031 (diff)
downloadop-kernel-dev-8ad31bf45db1c4a8f400cbc10400ce9fc0bed227.zip
op-kernel-dev-8ad31bf45db1c4a8f400cbc10400ce9fc0bed227.tar.gz
dmaengine: usb-dmac: Protect PM-only functions to kill warning
If CONFIG_PM=n: drivers/dma/sh/usb-dmac.c:677: warning: ‘usb_dmac_runtime_suspend’ defined but not used drivers/dma/sh/usb-dmac.c:688: warning: ‘usb_dmac_runtime_resume’ defined but not used Protect the unused functions by #ifdef CONFIG_PM to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/sh/usb-dmac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/dma/sh/usb-dmac.c b/drivers/dma/sh/usb-dmac.c
index f705798..ebd8a5f 100644
--- a/drivers/dma/sh/usb-dmac.c
+++ b/drivers/dma/sh/usb-dmac.c
@@ -673,6 +673,7 @@ static struct dma_chan *usb_dmac_of_xlate(struct of_phandle_args *dma_spec,
* Power management
*/
+#ifdef CONFIG_PM
static int usb_dmac_runtime_suspend(struct device *dev)
{
struct usb_dmac *dmac = dev_get_drvdata(dev);
@@ -690,6 +691,7 @@ static int usb_dmac_runtime_resume(struct device *dev)
return usb_dmac_init(dmac);
}
+#endif /* CONFIG_PM */
static const struct dev_pm_ops usb_dmac_pm = {
SET_RUNTIME_PM_OPS(usb_dmac_runtime_suspend, usb_dmac_runtime_resume,
OpenPOWER on IntegriCloud