diff options
Diffstat (limited to 'drivers/pcmcia/pxa2xx_base.c')
-rw-r--r-- | drivers/pcmcia/pxa2xx_base.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/drivers/pcmcia/pxa2xx_base.c b/drivers/pcmcia/pxa2xx_base.c index 325c992f7d8f..c2a12d53f6c7 100644 --- a/drivers/pcmcia/pxa2xx_base.c +++ b/drivers/pcmcia/pxa2xx_base.c | |||
@@ -205,32 +205,20 @@ int pxa2xx_drv_pcmcia_probe(struct device *dev) | |||
205 | } | 205 | } |
206 | EXPORT_SYMBOL(pxa2xx_drv_pcmcia_probe); | 206 | EXPORT_SYMBOL(pxa2xx_drv_pcmcia_probe); |
207 | 207 | ||
208 | static int pxa2xx_drv_pcmcia_suspend(struct device *dev, pm_message_t state, u32 level) | 208 | static int pxa2xx_drv_pcmcia_resume(struct device *dev) |
209 | { | 209 | { |
210 | int ret = 0; | 210 | struct pcmcia_low_level *ops = dev->platform_data; |
211 | if (level == SUSPEND_SAVE_STATE) | 211 | int nr = ops ? ops->nr : 0; |
212 | ret = pcmcia_socket_dev_suspend(dev, state); | ||
213 | return ret; | ||
214 | } | ||
215 | 212 | ||
216 | static int pxa2xx_drv_pcmcia_resume(struct device *dev, u32 level) | 213 | MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0); |
217 | { | 214 | |
218 | int ret = 0; | 215 | return pcmcia_socket_dev_resume(dev); |
219 | if (level == RESUME_RESTORE_STATE) | ||
220 | { | ||
221 | struct pcmcia_low_level *ops = dev->platform_data; | ||
222 | int nr = ops ? ops->nr : 0; | ||
223 | |||
224 | MECR = nr > 1 ? MECR_CIT | MECR_NOS : (nr > 0 ? MECR_CIT : 0); | ||
225 | ret = pcmcia_socket_dev_resume(dev); | ||
226 | } | ||
227 | return ret; | ||
228 | } | 216 | } |
229 | 217 | ||
230 | static struct device_driver pxa2xx_pcmcia_driver = { | 218 | static struct device_driver pxa2xx_pcmcia_driver = { |
231 | .probe = pxa2xx_drv_pcmcia_probe, | 219 | .probe = pxa2xx_drv_pcmcia_probe, |
232 | .remove = soc_common_drv_pcmcia_remove, | 220 | .remove = soc_common_drv_pcmcia_remove, |
233 | .suspend = pxa2xx_drv_pcmcia_suspend, | 221 | .suspend = pcmcia_socket_dev_suspend, |
234 | .resume = pxa2xx_drv_pcmcia_resume, | 222 | .resume = pxa2xx_drv_pcmcia_resume, |
235 | .name = "pxa2xx-pcmcia", | 223 | .name = "pxa2xx-pcmcia", |
236 | .bus = &platform_bus_type, | 224 | .bus = &platform_bus_type, |