[PATCH] drivers, pch_dma: Fix warning when CONFIG_PM=n.

From: Rakib Mullick
Date: Sun Mar 06 2011 - 06:26:16 EST


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@xxxxxxxxx>
---

diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c
index 1c38418..33073cc 100644
--- a/drivers/dma/pch_dma.c
+++ b/drivers/dma/pch_dma.c
@@ -694,6 +694,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;
@@ -771,6 +772,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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/