diff options
-rw-r--r-- | drivers/pcmcia/at91_cf.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 948efc775a78..eb6abd3f9221 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -336,16 +336,21 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
336 | enable_irq_wake(board->det_pin); | 336 | enable_irq_wake(board->det_pin); |
337 | if (board->irq_pin) | 337 | if (board->irq_pin) |
338 | enable_irq_wake(board->irq_pin); | 338 | enable_irq_wake(board->irq_pin); |
339 | } else { | ||
340 | disable_irq_wake(board->det_pin); | ||
341 | if (board->irq_pin) | ||
342 | disable_irq_wake(board->irq_pin); | ||
343 | } | 339 | } |
344 | return 0; | 340 | return 0; |
345 | } | 341 | } |
346 | 342 | ||
347 | static int at91_cf_resume(struct platform_device *pdev) | 343 | static int at91_cf_resume(struct platform_device *pdev) |
348 | { | 344 | { |
345 | struct at91_cf_socket *cf = platform_get_drvdata(pdev); | ||
346 | struct at91_cf_data *board = cf->board; | ||
347 | |||
348 | if (device_may_wakeup(&pdev->dev)) { | ||
349 | disable_irq_wake(board->det_pin); | ||
350 | if (board->irq_pin) | ||
351 | disable_irq_wake(board->irq_pin); | ||
352 | } | ||
353 | |||
349 | pcmcia_socket_dev_resume(&pdev->dev); | 354 | pcmcia_socket_dev_resume(&pdev->dev); |
350 | return 0; | 355 | return 0; |
351 | } | 356 | } |