Skip to content

Commit

Permalink
dmaengine: usb-dmac: Protect PM-only functions to kill warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geert Uytterhoeven authored and Vinod Koul committed Apr 27, 2015
1 parent b787f68 commit 8ad31bf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/dma/sh/usb-dmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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,
Expand Down

0 comments on commit 8ad31bf

Please sign in to comment.