Patchwork [4/4] rtc-bfin: add debug markers to suspend/resume paths

login
register
mail settings
Submitter Mike Frysinger
Date Aug. 17, 2010, 4:44 a.m.
Message ID <1282020249-8807-4-git-send-email-vapier@gentoo.org>
Download mbox | patch
Permalink /patch/61856/
State New
Headers show

Comments

Mike Frysinger - Aug. 17, 2010, 4:44 a.m.
The rest of the driver had debug markings already.  This also standardizes
the usage of "dev" a bit.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 drivers/rtc/rtc-bfin.c |   16 ++++++++++++----
 1 files changed, 12 insertions(+), 4 deletions(-)
Alessandro Zummo - Aug. 17, 2010, 10:23 a.m.
On Tue, 17 Aug 2010 00:44:09 -0400
Mike Frysinger <vapier@gentoo.org> wrote:

> The rest of the driver had debug markings already.  This also standardizes
> the usage of "dev" a bit.
> 
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>

 Acked-by: Alessandro Zummo <a.zummo@towertech.it>

Patch

diff --git a/drivers/rtc/rtc-bfin.c b/drivers/rtc/rtc-bfin.c
index 3506f33..b4b6087 100644
--- a/drivers/rtc/rtc-bfin.c
+++ b/drivers/rtc/rtc-bfin.c
@@ -2,7 +2,7 @@ 
  * Blackfin On-Chip Real Time Clock Driver
  *  Supports BF51x/BF52x/BF53[123]/BF53[467]/BF54x
  *
- * Copyright 2004-2009 Analog Devices Inc.
+ * Copyright 2004-2010 Analog Devices Inc.
  *
  * Enter bugs at http://blackfin.uclinux.org/
  *
@@ -427,9 +427,13 @@  static int __devexit bfin_rtc_remove(struct platform_device *pdev)
 #ifdef CONFIG_PM
 static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
 {
-	if (device_may_wakeup(&pdev->dev)) {
+	struct device *dev = &pdev->dev;
+
+	dev_dbg_stamp(dev);
+
+	if (device_may_wakeup(dev)) {
 		enable_irq_wake(IRQ_RTC);
-		bfin_rtc_sync_pending(&pdev->dev);
+		bfin_rtc_sync_pending(dev);
 	} else
 		bfin_rtc_int_clear(0);
 
@@ -438,7 +442,11 @@  static int bfin_rtc_suspend(struct platform_device *pdev, pm_message_t state)
 
 static int bfin_rtc_resume(struct platform_device *pdev)
 {
-	if (device_may_wakeup(&pdev->dev))
+	struct device *dev = &pdev->dev;
+
+	dev_dbg_stamp(dev);
+
+	if (device_may_wakeup(dev))
 		disable_irq_wake(IRQ_RTC);
 
 	/*