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]>
--- 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)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]