From yanmin_zhang@linux.intel.com Wed Sep 27 23:37:00 2006 Subject: PCI: fix pcie_portdrv_restore_config undefined without CONFIG_PM error From: "Zhang, Yanmin" To: Olaf Hering Cc: Yanmin Zhang , Greg Kroah-Hartman Message-Id: <1159425359.20092.615.camel@ymzhang-perf.sh.intel.com> Date: Thu, 28 Sep 2006 14:35:59 +0800 On Thu, 2006-09-28 at 03:42, Olaf Hering wrote: > PCI-Express AER implemetation: pcie_portdrv error handler > > This patch breaks if CONFIG_PM is not enabled, > pcie_portdrv_restore_config() will be undefined. I move the definition of pcie_portdrv_restore_config out of CONFIG_PM. Below patch is against 2.6.18-mm1. Could you try it? Signed-off-by: Zhang Yanmin Signed-off-by: Greg Kroah-Hartman --- drivers/pci/pcie/portdrv_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- gregkh-2.6.orig/drivers/pci/pcie/portdrv_pci.c +++ gregkh-2.6/drivers/pci/pcie/portdrv_pci.c @@ -37,7 +37,6 @@ static int pcie_portdrv_save_config(stru return pci_save_state(dev); } -#ifdef CONFIG_PM static int pcie_portdrv_restore_config(struct pci_dev *dev) { int retval; @@ -50,6 +49,7 @@ static int pcie_portdrv_restore_config(s return 0; } +#ifdef CONFIG_PM static int pcie_portdrv_suspend(struct pci_dev *dev, pm_message_t state) { int ret = pcie_port_device_suspend(dev, state);