From: Russell King The following patch fixes a minor but annoying issue with PCMCIA resume. When a machine is suspended with an empty socket, and then resumed with a card in the socket, the card is ignored. The following patch adjusts the resume paths such that we detect the card and properly initialise it. Signed-off-by: Russell King Signed-off-by: Andrew Morton --- 25-akpm/drivers/pcmcia/cs.c | 5 +++++ 1 files changed, 5 insertions(+) diff -puN drivers/pcmcia/cs.c~fix-pcmcia-resume-with-card-inserted drivers/pcmcia/cs.c --- 25/drivers/pcmcia/cs.c~fix-pcmcia-resume-with-card-inserted 2005-03-20 16:06:40.000000000 -0800 +++ 25-akpm/drivers/pcmcia/cs.c 2005-03-20 16:06:40.000000000 -0800 @@ -587,6 +587,11 @@ static int socket_resume(struct pcmcia_s skt->ops->init(skt); skt->ops->set_socket(skt, &skt->socket); + if (!(skt->state & SOCKET_PRESENT)) { + skt->state &= ~SOCKET_SUSPEND; + return socket_insert(skt); + } + ret = socket_setup(skt, resume_delay); if (ret == CS_SUCCESS) { /* _