aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/at91_cf.c
diff options
context:
space:
mode:
authorMarc Pignat <marc.pignat@hevs.ch>2007-05-31 03:40:44 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-31 10:58:13 -0400
commit9af20376ee65cd2d13f7eb587fab70879d8c355b (patch)
treede9eb640c886a1381120a500696f5b50ac801461 /drivers/pcmcia/at91_cf.c
parent8387c1a46376b8cfc5f4751b27a6c90f930992cf (diff)
at91: fix enable/disable_irq_wake symmetry in pcmcia driver
Fix enable_irq_wake and disable_irq_wake symmetry in at91 pcmcia driver 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. Signed-off-by: Marc Pignat <marc.pignat@hevs.ch> Cc: David Brownell <david-b@pacbell.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Pavel Machek <pavel@ucw.cz> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Cc: Andrew Victor <andrew@sanpeople.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pcmcia/at91_cf.c')
-rw-r--r--drivers/pcmcia/at91_cf.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 948efc775a78..eb6abd3f9221 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -336,16 +336,21 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg)
336 enable_irq_wake(board->det_pin); 336 enable_irq_wake(board->det_pin);
337 if (board->irq_pin) 337 if (board->irq_pin)
338 enable_irq_wake(board->irq_pin); 338 enable_irq_wake(board->irq_pin);
339 } else {
340 disable_irq_wake(board->det_pin);
341 if (board->irq_pin)
342 disable_irq_wake(board->irq_pin);
343 } 339 }
344 return 0; 340 return 0;
345} 341}
346 342
347static int at91_cf_resume(struct platform_device *pdev) 343static int at91_cf_resume(struct platform_device *pdev)
348{ 344{
345 struct at91_cf_socket *cf = platform_get_drvdata(pdev);
346 struct at91_cf_data *board = cf->board;
347
348 if (device_may_wakeup(&pdev->dev)) {
349 disable_irq_wake(board->det_pin);
350 if (board->irq_pin)
351 disable_irq_wake(board->irq_pin);
352 }
353
349 pcmcia_socket_dev_resume(&pdev->dev); 354 pcmcia_socket_dev_resume(&pdev->dev);
350 return 0; 355 return 0;
351} 356}