public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rodolfo Giometti <giometti@enneenne.com>
To: linux-pcmcia@lists.infradead.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] PCMCIA: prevent auto insert during resume.
Date: Fri, 26 Oct 2007 12:51:25 +0200	[thread overview]
Message-ID: <20071026105125.GA28769@enneenne.com> (raw)

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


             reply	other threads:[~2007-10-26 10:49 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26 10:51 Rodolfo Giometti [this message]
2007-10-26 15:11 ` [PATCH] PCMCIA: prevent auto insert during resume 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071026105125.GA28769@enneenne.com \
    --to=giometti@enneenne.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox