drivers, pch_dma: Fix warning when CONFIG_PM=n.
authorRakib Mullick <rakib.mullick@gmail.com>
Sun, 6 Mar 2011 11:26:10 +0000 (17:26 +0600)
committerVinod Koul <vinod.koul@intel.com>
Sun, 6 Mar 2011 19:56:50 +0000 (01:26 +0530)
When CONFIG_PM=n, we get the following warning:

drivers/dma/pch_dma.c:741: warning: ‘pch_dma_suspend’ defined but not used
drivers/dma/pch_dma.c:755: warning: ‘pch_dma_resume’ defined but not used

To fix it, wrap pch_dma_{suspend,resume} and
pch_dma_{save,restore}_regs functions with CONFIG_PM.

Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
drivers/dma/pch_dma.c

index b1dfba7e37b4e82bdceb2e55c39bebe523e75ce4..8d8fef1480a93115ab17c51f6c97d0130b44b21d 100644 (file)
@@ -693,6 +693,7 @@ static irqreturn_t pd_irq(int irq, void *devid)
        return ret;
 }
 
+#ifdef CONFIG_PM
 static void pch_dma_save_regs(struct pch_dma *pd)
 {
        struct pch_dma_chan *pd_chan;
@@ -770,6 +771,7 @@ static int pch_dma_resume(struct pci_dev *pdev)
 
        return 0;
 }
+#endif
 
 static int __devinit pch_dma_probe(struct pci_dev *pdev,
                                   const struct pci_device_id *id)