mtd/nand/r852: fix build for CONFIG_PM=n

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Mar 8 21:59:02 EST 2010


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=b2aaf7a2b476820cf5fd7738e8641ed88046acf5
Commit:     b2aaf7a2b476820cf5fd7738e8641ed88046acf5
Parent:     fb45d3232c641bfee5000c8a81e2005903734702
Author:     Randy Dunlap <randy.dunlap at oracle.com>
AuthorDate: Mon Mar 1 13:54:19 2010 -0800
Committer:  David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Mon Mar 8 18:32:05 2010 -0800

    mtd/nand/r852: fix build for CONFIG_PM=n
    
    Fix r852 build for the case of CONFIG_PM=n.
    
    drivers/mtd/nand/r852.c:1039: error: implicit declaration of function 'pci_prepare_to_sleep'
    drivers/mtd/nand/r852.c:1048: error: implicit declaration of function 'pci_back_from_sleep'
    
    This patch leaves r852_pm_ops untouched.
    
    Signed-off-by: Randy Dunlap <randy.dunlap at oracle.com>
    Acked-by: Maxim Levitsky <maximlevitsky at gmail.com>
    Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
 drivers/mtd/nand/r852.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/r852.c b/drivers/mtd/nand/r852.c
index cb27116..96db476 100644
--- a/drivers/mtd/nand/r852.c
+++ b/drivers/mtd/nand/r852.c
@@ -1019,6 +1019,7 @@ void r852_shutdown(struct pci_dev *pci_dev)
 	pci_disable_device(pci_dev);
 }
 
+#ifdef CONFIG_PM
 int r852_suspend(struct device *device)
 {
 	struct r852_device *dev = pci_get_drvdata(to_pci_dev(device));
@@ -1093,6 +1094,10 @@ int r852_resume(struct device *device)
 	r852_update_card_detect(dev);
 	return 0;
 }
+#else
+#define r852_suspend	NULL
+#define r852_resume	NULL
+#endif
 
 static const struct pci_device_id r852_pci_id_tbl[] = {
 



More information about the linux-mtd-cvs mailing list