diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2009-12-29 12:21:39 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-01-17 12:30:05 -0500 |
commit | 933a838aa1aae8388438bb002fbdaf6fca519a5c (patch) | |
tree | d12a160e7c82de94e9eb3de11ac047c783a52e49 | |
parent | 9ddabb6700f82a033a76bcf7a547204fa12aaa17 (diff) |
pcmcia: make use of pcmcia_dev_resume() return value
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>
-rw-r--r-- | drivers/pcmcia/ds.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c index 1a4a3c49cc15..defa44c27b97 100644 --- a/drivers/pcmcia/ds.c +++ b/drivers/pcmcia/ds.c | |||
@@ -970,13 +970,14 @@ static int runtime_suspend(struct device *dev) | |||
970 | return rc; | 970 | return rc; |
971 | } | 971 | } |
972 | 972 | ||
973 | static void runtime_resume(struct device *dev) | 973 | static int runtime_resume(struct device *dev) |
974 | { | 974 | { |
975 | int rc; | 975 | int rc; |
976 | 976 | ||
977 | down(&dev->sem); | 977 | down(&dev->sem); |
978 | rc = pcmcia_dev_resume(dev); | 978 | rc = pcmcia_dev_resume(dev); |
979 | up(&dev->sem); | 979 | up(&dev->sem); |
980 | return rc; | ||
980 | } | 981 | } |
981 | 982 | ||
982 | /************************ per-device sysfs output ***************************/ | 983 | /************************ per-device sysfs output ***************************/ |
@@ -1027,7 +1028,7 @@ static ssize_t pcmcia_store_pm_state(struct device *dev, struct device_attribute | |||
1027 | if ((!p_dev->suspended) && !strncmp(buf, "off", 3)) | 1028 | if ((!p_dev->suspended) && !strncmp(buf, "off", 3)) |
1028 | ret = runtime_suspend(dev); | 1029 | ret = runtime_suspend(dev); |
1029 | else if (p_dev->suspended && !strncmp(buf, "on", 2)) | 1030 | else if (p_dev->suspended && !strncmp(buf, "on", 2)) |
1030 | runtime_resume(dev); | 1031 | ret = runtime_resume(dev); |
1031 | 1032 | ||
1032 | return ret ? ret : count; | 1033 | return ret ? ret : count; |
1033 | } | 1034 | } |