mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Pignat <marc.pignat@hevs.ch>
To: andrew@sanpeople.com
Cc: dbrownell@users.sourceforge.net, linux-kernel@vger.kernel.org
Subject: [PATCH] at91: fix enable/disable_irq_wake symmetry in pcmcia driver
Date: Thu, 10 May 2007 09:52:59 +0200	[thread overview]
Message-ID: <200705100952.59310.marc.pignat@hevs.ch> (raw)

from Marc Pignat <marc.pignat@hevs.ch>

fix enable_irq_wake and disable_irq_wake symmetry in at91 pcmcia driver

Signed-off-by: Marc Pignat <marc.pignat@hevs.ch>
---
This patch applies to the 2.6.21.1 kernel.

disable_irq_wake call must be symmetric with enable_irq_wake. This patch fix 
that problem for the at91_pcmia driver.
It seems that this patch was forgotten when we've fixed irq_wake symmetry in 
all at91 related drivers.
It was discussed in the "at91 drivers and [enable/disable]_irq_wake (wrong?) 
usage" thread on the linux-arm-kernel mailing list.

Regards

Marc

--- 2.6.21.1/drivers/pcmcia/at91_cf.c.orig	2007-05-10 08:43:16.000000000 +0200
+++ 2.6.21.1/drivers/pcmcia/at91_cf.c	2007-05-10 09:07:06.000000000 +0200
@@ -336,16 +336,18 @@ static int at91_cf_suspend(struct platfo
 		enable_irq_wake(board->det_pin);
 		if (board->irq_pin)
 			enable_irq_wake(board->irq_pin);
-	} else {
-		disable_irq_wake(board->det_pin);
-		if (board->irq_pin)
-			disable_irq_wake(board->irq_pin);
 	}
 	return 0;
 }

 static int at91_cf_resume(struct platform_device *pdev)
 {
+	if (device_may_wakeup(&pdev->dev)) {
+		disable_irq_wake(board->det_pin);
+		if (board->irq_pin)
+			disable_irq_wake(board->irq_pin);
+	}
+
 	pcmcia_socket_dev_resume(&pdev->dev);
 	return 0;
 }


                 reply	other threads:[~2007-05-10  8:48 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200705100952.59310.marc.pignat@hevs.ch \
    --to=marc.pignat@hevs.ch \
    --cc=andrew@sanpeople.com \
    --cc=dbrownell@users.sourceforge.net \
    --cc=linux-kernel@vger.kernel.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

all inboxes | Powered by JetHome®