Skip to content

Commit

Permalink
pcmcia: make use of pcmcia_dev_resume() return value
Browse files Browse the repository at this point in the history
In runtime_resume(), do not throw away the return value of
pcmcia_dev_resume(), for we can use it (at least) in
pcmcia_store_pm_state(). This also fixes the pointless assignment
previosly seen there, as noted by Dan Carpenter.

CC: Dan Carpenter <error27@gmail.com>
Tested-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
  • Loading branch information
Dominik Brodowski committed Jan 17, 2010
1 parent 9ddabb6 commit 933a838
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/pcmcia/ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -970,13 +970,14 @@ static int runtime_suspend(struct device *dev)
return rc;
}

static void runtime_resume(struct device *dev)
static int runtime_resume(struct device *dev)
{
int rc;

down(&dev->sem);
rc = pcmcia_dev_resume(dev);
up(&dev->sem);
return rc;
}

/************************ per-device sysfs output ***************************/
Expand Down Expand Up @@ -1027,7 +1028,7 @@ static ssize_t pcmcia_store_pm_state(struct device *dev, struct device_attribute
if ((!p_dev->suspended) && !strncmp(buf, "off", 3))
ret = runtime_suspend(dev);
else if (p_dev->suspended && !strncmp(buf, "on", 2))
runtime_resume(dev);
ret = runtime_resume(dev);

return ret ? ret : count;
}
Expand Down

0 comments on commit 933a838

Please sign in to comment.