All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Patrick Mochel <mochel@osdl.org>, Greg KH <greg@kroah.com>
Cc: linux-kernel mailing list <linux-kernel@vger.kernel.org>
Subject: PCI PM & compatibility
Date: Sat, 23 Aug 2003 16:39:57 +0200	[thread overview]
Message-ID: <1061649597.780.4.camel@gaston> (raw)

Hi !

What about this patch to stay compatible with existing drivers
implementing everything in save_state ?

Ideally, we should kill save_state and fix all drivers, oh well...

(This version of the patch has correct space/tabs)

Ben.

--- a/drivers/pci/pci-driver.c	Sat Aug 23 16:39:14 2003
+++ b/drivers/pci/pci-driver.c	Sat Aug 23 16:39:14 2003
@@ -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;


             reply	other threads:[~2003-08-23 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-23 14:39 Benjamin Herrenschmidt [this message]
2003-08-23 17:08 ` PCI PM & compatibility Russell King
2003-08-23 17:28   ` Benjamin Herrenschmidt
2003-08-23 17:48     ` Russell King
2003-08-26 15:31       ` Patrick Mochel
2003-08-26 17:51         ` Russell King
2003-08-27 22:57           ` Patrick Mochel
2003-08-28 21:45             ` Russell King
2003-08-27 12:43         ` Benjamin Herrenschmidt
2003-08-27 23:29           ` Patrick Mochel
2003-08-28  8:39             ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1061649597.780.4.camel@gaston \
    --to=benh@kernel.crashing.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mochel@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.