Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d6b4fa6d698f5cf331ead08db4ba5e60cd3c83be Commit: d6b4fa6d698f5cf331ead08db4ba5e60cd3c83be Parent: 906da809c5be30b4c7f32bb6a489fb25ad794878 Author: David Brownell <[EMAIL PROTECTED]> AuthorDate: Mon Feb 4 22:27:37 2008 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Tue Feb 5 09:44:08 2008 -0800
pcmcia: stop updating dev->power.power_state 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 <[EMAIL PROTECTED]> Cc: Dominik Brodowski <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- drivers/pcmcia/ds.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 15c18f5..846468c 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c @@ -1130,8 +1130,6 @@ static int runtime_suspend(struct device *dev) 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; } @@ -1142,8 +1140,6 @@ static void runtime_resume(struct device *dev) 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 ***************************/ @@ -1265,6 +1261,9 @@ static int pcmcia_dev_suspend(struct device * dev, pm_message_t state) 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) @@ -1301,6 +1300,9 @@ static int pcmcia_dev_resume(struct device * dev) 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) - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html