diff mbox

[RFC,2/3] omap3+: sr: Sync sr_stop_vddautocomp implementation with sr_start_vddautocomp

Message ID 1299081445-27938-3-git-send-email-jhnikula@gmail.com (mailing list archive)
State New, archived
Delegated to: Kevin Hilman
Headers show

Commit Message

Jarkko Nikula March 2, 2011, 3:57 p.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index d94894a..11741d8 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -229,6 +229,9 @@  static void sr_start_vddautocomp(struct omap_sr *sr)
 
 static void sr_stop_vddautocomp(struct omap_sr *sr)
 {
+	if (!sr->autocomp_active)
+		return;
+
 	if (!sr_class || !(sr_class->disable)) {
 		dev_warn(&sr->pdev->dev,
 			"%s: smartreflex class driver not registered\n",
@@ -236,10 +239,8 @@  static void sr_stop_vddautocomp(struct omap_sr *sr)
 		return;
 	}
 
-	if (sr->autocomp_active) {
-		sr_class->disable(sr->voltdm, 1);
+	if (!sr_class->disable(sr->voltdm, 1))
 		sr->autocomp_active = false;
-	}
 }
 
 /*