aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/cs.c')
-rw-r--r--drivers/pcmcia/cs.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 7cf09084ef61..83d2753814c2 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -780,8 +780,13 @@ int pccard_reset_card(struct pcmcia_socket *skt)
780 ret = send_event(skt, CS_EVENT_RESET_REQUEST, CS_EVENT_PRI_LOW); 780 ret = send_event(skt, CS_EVENT_RESET_REQUEST, CS_EVENT_PRI_LOW);
781 if (ret == 0) { 781 if (ret == 0) {
782 send_event(skt, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW); 782 send_event(skt, CS_EVENT_RESET_PHYSICAL, CS_EVENT_PRI_LOW);
783 if (socket_reset(skt) == CS_SUCCESS) 783 if (skt->callback)
784 skt->callback->suspend(skt);
785 if (socket_reset(skt) == CS_SUCCESS) {
784 send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW); 786 send_event(skt, CS_EVENT_CARD_RESET, CS_EVENT_PRI_LOW);
787 if (skt->callback)
788 skt->callback->resume(skt);
789 }
785 } 790 }
786 791
787 ret = CS_SUCCESS; 792 ret = CS_SUCCESS;
@@ -812,6 +817,11 @@ int pcmcia_suspend_card(struct pcmcia_socket *skt)
812 ret = CS_UNSUPPORTED_FUNCTION; 817 ret = CS_UNSUPPORTED_FUNCTION;
813 break; 818 break;
814 } 819 }
820 if (skt->callback) {
821 ret = skt->callback->suspend(skt);
822 if (ret)
823 break;
824 }
815 ret = socket_suspend(skt); 825 ret = socket_suspend(skt);
816 } while (0); 826 } while (0);
817 up(&skt->skt_sem); 827 up(&skt->skt_sem);
@@ -838,6 +848,8 @@ int pcmcia_resume_card(struct pcmcia_socket *skt)
838 break; 848 break;
839 } 849 }
840 ret = socket_resume(skt); 850 ret = socket_resume(skt);
851 if (!ret && skt->callback)
852 skt->callback->resume(skt);
841 } while (0); 853 } while (0);
842 up(&skt->skt_sem); 854 up(&skt->skt_sem);
843 855