Commit d6b4fa6d authored by David Brownell's avatar David Brownell Committed by Linus Torvalds

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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Cc: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 906da809
...@@ -1130,8 +1130,6 @@ static int runtime_suspend(struct device *dev) ...@@ -1130,8 +1130,6 @@ static int runtime_suspend(struct device *dev)
down(&dev->sem); down(&dev->sem);
rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND); rc = pcmcia_dev_suspend(dev, PMSG_SUSPEND);
up(&dev->sem); up(&dev->sem);
if (!rc)
dev->power.power_state.event = PM_EVENT_SUSPEND;
return rc; return rc;
} }
...@@ -1142,8 +1140,6 @@ static void runtime_resume(struct device *dev) ...@@ -1142,8 +1140,6 @@ static void runtime_resume(struct device *dev)
down(&dev->sem); down(&dev->sem);
rc = pcmcia_dev_resume(dev); rc = pcmcia_dev_resume(dev);
up(&dev->sem); up(&dev->sem);
if (!rc)
dev->power.power_state.event = PM_EVENT_ON;
} }
/************************ per-device sysfs output ***************************/ /************************ per-device sysfs output ***************************/
...@@ -1265,6 +1261,9 @@ static int pcmcia_dev_suspend(struct device * dev, pm_message_t state) ...@@ -1265,6 +1261,9 @@ static int pcmcia_dev_suspend(struct device * dev, pm_message_t state)
struct pcmcia_driver *p_drv = NULL; struct pcmcia_driver *p_drv = NULL;
int ret = 0; int ret = 0;
if (p_dev->suspended)
return 0;
ds_dbg(2, "suspending %s\n", dev->bus_id); ds_dbg(2, "suspending %s\n", dev->bus_id);
if (dev->driver) if (dev->driver)
...@@ -1301,6 +1300,9 @@ static int pcmcia_dev_resume(struct device * dev) ...@@ -1301,6 +1300,9 @@ static int pcmcia_dev_resume(struct device * dev)
struct pcmcia_driver *p_drv = NULL; struct pcmcia_driver *p_drv = NULL;
int ret = 0; int ret = 0;
if (!p_dev->suspended)
return 0;
ds_dbg(2, "resuming %s\n", dev->bus_id); ds_dbg(2, "resuming %s\n", dev->bus_id);
if (dev->driver) if (dev->driver)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment