public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] PCMCIA: prevent auto insert during resume.
@ 2007-10-26 10:51 Rodolfo Giometti
  2007-10-26 15:11 ` Russell King
  0 siblings, 1 reply; 18+ messages in thread
From: Rodolfo Giometti @ 2007-10-26 10:51 UTC (permalink / raw)
  To: linux-pcmcia; +Cc: linux-kernel

If a socket has been ejected before sleeping, at resume time it
shouldn't be awaked.

Signed-off-by: Rodolfo Giometti <giometti@linux.it>
---
 drivers/pcmcia/cs.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 729e37d..d69de74 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -562,10 +562,8 @@ static int socket_resume(struct pcmcia_socket *skt)
 	skt->ops->init(skt);
 	skt->ops->set_socket(skt, &skt->socket);
 
-	if (!(skt->state & SOCKET_PRESENT)) {
-		skt->state &= ~SOCKET_SUSPEND;
-		return socket_insert(skt);
-	}
+	if (!(skt->state & SOCKET_PRESENT))
+		goto resume_exit;
 
 	ret = socket_setup(skt, SS_COMA, resume_delay);
 	if (ret == CS_SUCCESS) {
@@ -599,6 +597,7 @@ static int socket_resume(struct pcmcia_socket *skt)
 		socket_shutdown(skt);
 	}
 
+resume_exit:
 	skt->state &= ~SOCKET_SUSPEND;
 
 	return CS_SUCCESS;
-- 
1.5.2.5


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2007-11-06  9:06 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-26 10:51 [PATCH] PCMCIA: prevent auto insert during resume Rodolfo Giometti
2007-10-26 15:11 ` Russell King
2007-10-26 15:47   ` Rodolfo Giometti
2007-10-26 16:02     ` Russell King
2007-10-26 16:27       ` Rodolfo Giometti
2007-10-26 16:36         ` Russell King
2007-10-26 16:54           ` Rodolfo Giometti
2007-10-26 17:00             ` Russell King
2007-10-26 17:18               ` Rodolfo Giometti
2007-10-26 18:37                 ` Russell King
2007-10-26 20:52                   ` Rodolfo Giometti
2007-10-29 19:24                 ` Pavel Machek
2007-11-01 14:53                   ` Rodolfo Giometti
2007-11-01 18:37                     ` Russell King
2007-11-01 18:56                       ` Russell King
2007-11-01 22:43                         ` Rafael J. Wysocki
2007-11-06  9:09                         ` Rodolfo Giometti
2007-11-06  8:58                       ` Rodolfo Giometti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox