mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] Power: call save_state on PCI devices along with suspend
@ 2003-09-09 18:41 Benjamin Herrenschmidt
  2003-09-09 21:04 ` Patrick Mochel
  0 siblings, 1 reply; 5+ messages in thread
From: Benjamin Herrenschmidt @ 2003-09-09 18:41 UTC (permalink / raw)
  To: Patrick Mochel; +Cc: linux-kernel mailing list

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;



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2003-09-09 21:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-09 18:41 [PATCH] Power: call save_state on PCI devices along with suspend Benjamin Herrenschmidt
2003-09-09 21:04 ` Patrick Mochel
2003-09-09 21:09   ` Benjamin Herrenschmidt
2003-09-09 21:20     ` Russell King
2003-09-09 21:46     ` Patrick Mochel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome