Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Geert Uytterhoeven and committed by
Vinod Koul
8ad31bf4 b787f68c

+2
+2
drivers/dma/sh/usb-dmac.c
··· 673 673 * Power management 674 674 */ 675 675 676 + #ifdef CONFIG_PM 676 677 static int usb_dmac_runtime_suspend(struct device *dev) 677 678 { 678 679 struct usb_dmac *dmac = dev_get_drvdata(dev); ··· 691 690 692 691 return usb_dmac_init(dmac); 693 692 } 693 + #endif /* CONFIG_PM */ 694 694 695 695 static const struct dev_pm_ops usb_dmac_pm = { 696 696 SET_RUNTIME_PM_OPS(usb_dmac_runtime_suspend, usb_dmac_runtime_resume,