[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1368443127-9636-1-git-send-email-mika.westerberg@linux.intel.com>
Date: Mon, 13 May 2013 14:05:27 +0300
From: Mika Westerberg <mika.westerberg@...ux.intel.com>
To: linux-pm@...r.kernel.org
Cc: Pavel Machek <pavel@....cz>,
"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
Len Brown <len.brown@...el.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Mika Westerberg <mika.westerberg@...ux.intel.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] PM / Runtime: honor device autosuspend in pm_generic_runtime_idle()
If the device is using autosuspend we should honor that and call
pm_runtime_autosuspend() instead of pm_runtime_suspend(). Failing to do so
causes the device to be suspended immediately even though it expects to be
suspended only when the autosuspend delay is expired.
Signed-off-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
---
drivers/base/power/generic_ops.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/base/power/generic_ops.c b/drivers/base/power/generic_ops.c
index bfd898b..19786ca 100644
--- a/drivers/base/power/generic_ops.c
+++ b/drivers/base/power/generic_ops.c
@@ -29,7 +29,10 @@ int pm_generic_runtime_idle(struct device *dev)
return ret;
}
- pm_runtime_suspend(dev);
+ if (dev->power.use_autosuspend)
+ pm_runtime_autosuspend(dev);
+ else
+ pm_runtime_suspend(dev);
return 0;
}
EXPORT_SYMBOL_GPL(pm_generic_runtime_idle);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists