All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Brownell <david-b@pacbell.net>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel list <linux-kernel@vger.kernel.org>,
	linux-pcmcia@lists.infradead.org
Subject: [patch 2.6.24-rc4] pcmcia stops updating dev->power.power_state
Date: Tue, 4 Dec 2007 12:28:07 -0800	[thread overview]
Message-ID: <200712041228.07688.david-b@pacbell.net> (raw)

This stops the pcmcia core from using dev->power.power_state;
that field is deprecated (overdue for removal) and the only reason
to update it was to make the /sys/devices/.../power/state files
(now removed) work better.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>

--- pstate.orig/drivers/pcmcia/ds.c	2007-12-04 09:33:12.000000000 -0800
+++ pstate/drivers/pcmcia/ds.c	2007-12-04 09:36:15.000000000 -0800
@@ -1129,8 +1129,6 @@ static int runtime_suspend(struct device
 	down(&dev->sem);
 	rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND);
 	up(&dev->sem);
-	if (!rc)
-		dev->power.power_state.event = PM_EVENT_SUSPEND;
 	return rc;
 }
 
@@ -1141,8 +1139,6 @@ static void runtime_resume(struct device
 	down(&dev->sem);
 	rc = pcmcia_dev_resume(dev);
 	up(&dev->sem);
-	if (!rc)
-		dev->power.power_state.event = PM_EVENT_ON;
 }
 
 /************************ per-device sysfs output ***************************/
@@ -1264,6 +1260,9 @@ static int pcmcia_dev_suspend(struct dev
 	struct pcmcia_driver *p_drv = NULL;
 	int ret = 0;
 
+	if (p_dev->suspended)
+		return 0;
+
 	ds_dbg(2, "suspending %s\n", dev->bus_id);
 
 	if (dev->driver)
@@ -1300,6 +1299,9 @@ static int pcmcia_dev_resume(struct devi
         struct pcmcia_driver *p_drv = NULL;
 	int ret = 0;
 
+	if (!p_dev->suspended)
+		return 0;
+
 	ds_dbg(2, "resuming %s\n", dev->bus_id);
 
 	if (dev->driver)

                 reply	other threads:[~2007-12-04 20:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200712041228.07688.david-b@pacbell.net \
    --to=david-b@pacbell.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.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.