linux/drivers/base/power
Ben Dooks 8a6720ec20 PM / clock_ops: fix up clk prepare/unprepare count
The drivers/base/power/clock_ops.c file is causing warnings from
the clock driver (as shown below) due to failing to do a clk_prepare()
call before enabling a clock. It also fails to check the balance of
prepare/unprepare as __pm_clk_remove() do clk_disable_unprepare() call.

This bug has probably been in since commit b2476490e ("clk: introduce
the common clock framework") as the warning was part of the original
commit. It is strange that it has not been noticed (although this has
also been coupled with a failure for certain SH builds to not build the
necessary glue to use this method of controlling the clocks).

In summary, this is probably needed in several stable branches but need
advice on which ones.

On the Renesas Lager board, this causes numerous warnings of the following
and even worse the clock system will not enable clocks, causing drivers
that are in development to fail to work:

WARNING: CPU: 0 PID: 1 at drivers/clk/clk.c:883 __clk_enable+0x2c/0xa0()

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2014-01-15 01:50:50 +01:00
..
clock_ops.c PM / clock_ops: fix up clk prepare/unprepare count 2014-01-15 01:50:50 +01:00
common.c PM: Avoid calling kfree() under spinlock in dev_pm_put_subsys_data() 2013-05-12 14:04:40 +02:00
domain.c PM / Runtime: Rework the "runtime idle" helper routine 2013-06-03 21:49:52 +02:00
domain_governor.c PM / Domains: Fix computation of maximum domain off time 2012-05-11 21:11:44 +02:00
generic_ops.c PM / Runtime: Rework the "runtime idle" helper routine 2013-06-03 21:49:52 +02:00
main.c Revert "cpufreq: suspend governors on system suspend/hibernate" 2013-12-08 01:04:17 +01:00
Makefile PM / Domains: Add device stop governor function (v4) 2011-12-01 21:47:40 +01:00
opp.c PM / OPP: rename header to linux/pm_opp.h 2013-10-25 22:33:23 +02:00
power.h PM / QoS: Remove device PM QoS sysfs attributes at the right place 2013-03-04 14:23:12 +01:00
qos.c PM / QoS: Add dev_pm_qos_request tracepoints 2013-06-24 13:09:03 +02:00
runtime.c PM / Runtime: Respect autosuspend when idle triggers suspend 2013-10-16 02:06:57 +02:00
sysfs.c driver core: replace strict_strto*() with kstrto*() 2013-07-26 18:02:43 -07:00
trace.c drivers/base: Add export.h for EXPORT_SYMBOL/THIS_MODULE as required. 2011-10-31 19:31:38 -04:00
wakeup.c PM / Sleep: Print last wakeup source on failed wakeup_count write 2013-06-21 00:35:12 +02:00