diff options
-rw-r--r-- | drivers/pcmcia/cs.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c index 75ed866e6953..c3383750e333 100644 --- a/drivers/pcmcia/cs.c +++ b/drivers/pcmcia/cs.c | |||
@@ -671,20 +671,22 @@ static int pccardd(void *__skt) | |||
671 | socket_remove(skt); | 671 | socket_remove(skt); |
672 | if (sysfs_events & PCMCIA_UEVENT_INSERT) | 672 | if (sysfs_events & PCMCIA_UEVENT_INSERT) |
673 | socket_insert(skt); | 673 | socket_insert(skt); |
674 | if ((sysfs_events & PCMCIA_UEVENT_RESUME) && | ||
675 | !(skt->state & SOCKET_CARDBUS)) { | ||
676 | ret = socket_resume(skt); | ||
677 | if (!ret && skt->callback) | ||
678 | skt->callback->resume(skt); | ||
679 | } | ||
680 | if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) && | 674 | if ((sysfs_events & PCMCIA_UEVENT_SUSPEND) && |
681 | !(skt->state & SOCKET_CARDBUS)) { | 675 | !(skt->state & SOCKET_CARDBUS)) { |
682 | if (skt->callback) | 676 | if (skt->callback) |
683 | ret = skt->callback->suspend(skt); | 677 | ret = skt->callback->suspend(skt); |
684 | else | 678 | else |
685 | ret = 0; | 679 | ret = 0; |
686 | if (!ret) | 680 | if (!ret) { |
687 | socket_suspend(skt); | 681 | socket_suspend(skt); |
682 | msleep(100); | ||
683 | } | ||
684 | } | ||
685 | if ((sysfs_events & PCMCIA_UEVENT_RESUME) && | ||
686 | !(skt->state & SOCKET_CARDBUS)) { | ||
687 | ret = socket_resume(skt); | ||
688 | if (!ret && skt->callback) | ||
689 | skt->callback->resume(skt); | ||
688 | } | 690 | } |
689 | if ((sysfs_events & PCMCIA_UEVENT_REQUERY) && | 691 | if ((sysfs_events & PCMCIA_UEVENT_REQUERY) && |
690 | !(skt->state & SOCKET_CARDBUS)) { | 692 | !(skt->state & SOCKET_CARDBUS)) { |