[PATCH] Power: call save_state on PCI devices along with suspend

From: Benjamin Herrenschmidt
Date: Tue Sep 09 2003 - 13:43:41 EST


Hi Patrick !

Don't we want that ? It will help if any driver currently relies on
the save_state callback to be called...

Ben.

diff -urN linux-2.5/drivers/pci/pci-driver.c linuxppc-2.5-benh/drivers/pci/pci-driver.c
--- linux-2.5/drivers/pci/pci-driver.c 2003-09-09 20:16:09.000000000 +0200
+++ linuxppc-2.5-benh/drivers/pci/pci-driver.c 2003-09-09 20:05:59.000000000 +0200
@@ -163,6 +163,9 @@
struct pci_dev * pci_dev = to_pci_dev(dev);
struct pci_driver * drv = pci_dev->driver;

+ /* Compatibility with drivers using obsolete save_state */
+ if (drv && drv->save_state)
+ return drv->save_state(pci_dev,state);
if (drv && drv->suspend)
return drv->suspend(pci_dev,state);
return 0;


-
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/