Skip to content

Commit

Permalink
pcmcia: stop updating dev->power.power_state
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Feb 5, 2008
1 parent 906da80 commit d6b4fa6
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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 ***************************/
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit d6b4fa6

Please sign in to comment.