aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/ds.c
diff options
context:
space:
mode:
authorDavid Brownell <david-b@pacbell.net>2008-02-05 01:27:37 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:08 -0500
commitd6b4fa6d698f5cf331ead08db4ba5e60cd3c83be (patch)
tree5db5d6d7c60ba1b6712581a4d99a8a54bdeee739 /drivers/pcmcia/ds.c
parent906da809c5be30b4c7f32bb6a489fb25ad794878 (diff)
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 <dbrownell@users.sourceforge.net> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pcmcia/ds.c')
-rw-r--r--drivers/pcmcia/ds.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 15c18f5246d6..846468ce1144 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -1130,8 +1130,6 @@ static int runtime_suspend(struct device *dev)
1130 down(&dev->sem); 1130 down(&dev->sem);
1131 rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND); 1131 rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND);
1132 up(&dev->sem); 1132 up(&dev->sem);
1133 if (!rc)
1134 dev->power.power_state.event = PM_EVENT_SUSPEND;
1135 return rc; 1133 return rc;
1136} 1134}
1137 1135
@@ -1142,8 +1140,6 @@ static void runtime_resume(struct device *dev)
1142 down(&dev->sem); 1140 down(&dev->sem);
1143 rc = pcmcia_dev_resume(dev); 1141 rc = pcmcia_dev_resume(dev);
1144 up(&dev->sem); 1142 up(&dev->sem);
1145 if (!rc)
1146 dev->power.power_state.event = PM_EVENT_ON;
1147} 1143}
1148 1144
1149/************************ per-device sysfs output ***************************/ 1145/************************ per-device sysfs output ***************************/
@@ -1265,6 +1261,9 @@ static int pcmcia_dev_suspend(struct device * dev, pm_message_t state)
1265 struct pcmcia_driver *p_drv = NULL; 1261 struct pcmcia_driver *p_drv = NULL;
1266 int ret = 0; 1262 int ret = 0;
1267 1263
1264 if (p_dev->suspended)
1265 return 0;
1266
1268 ds_dbg(2, "suspending %s\n", dev->bus_id); 1267 ds_dbg(2, "suspending %s\n", dev->bus_id);
1269 1268
1270 if (dev->driver) 1269 if (dev->driver)
@@ -1301,6 +1300,9 @@ static int pcmcia_dev_resume(struct device * dev)
1301 struct pcmcia_driver *p_drv = NULL; 1300 struct pcmcia_driver *p_drv = NULL;
1302 int ret = 0; 1301 int ret = 0;
1303 1302
1303 if (!p_dev->suspended)
1304 return 0;
1305
1304 ds_dbg(2, "resuming %s\n", dev->bus_id); 1306 ds_dbg(2, "resuming %s\n", dev->bus_id);
1305 1307
1306 if (dev->driver) 1308 if (dev->driver)