summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLi Fei <fei.li@intel.com>2013-02-28 08:37:11 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-01 07:54:16 +0100
commit283189d3be56aa6db6f192bb255df68493cd79ac (patch)
treef59b3424585aa8e4383626df29486127826b63be /drivers
parentMerge remote-tracking branch 'regmap/topic/no-bus' into regmap-next (diff)
downloadlinux-283189d3be56aa6db6f192bb255df68493cd79ac.tar.xz
linux-283189d3be56aa6db6f192bb255df68493cd79ac.zip
regmap: irq: call pm_runtime_put in pm_runtime_get_sync failed case
Even in failed case of pm_runtime_get_sync, the usage_count is incremented. In order to keep the usage_count with correct value and runtime power management to behave correctly, call pm_runtime_put(_sync) in such case. Signed-off-by Liu Chuansheng <chuansheng.liu@intel.com> Signed-off-by: Li Fei <fei.li@intel.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/base/regmap/regmap-irq.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 4706c63d0bc6..020ea2b9fd2f 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -184,6 +184,7 @@ static irqreturn_t regmap_irq_thread(int irq, void *d)
if (ret < 0) {
dev_err(map->dev, "IRQ thread failed to resume: %d\n",
ret);
+ pm_runtime_put(map->dev);
return IRQ_NONE;
}
}