From db7ce04f598be1a260a6616fc19bb3ae53853d46 Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 26 Mar 2013 06:08:52 +0000 Subject: [PATCH] --- yaml --- r: 374549 b: refs/heads/master c: 51d45d25948bdf7422958b92a2d91dc703b1a4cc h: refs/heads/master i: 374547: b1bc2297139c2a543f1cf8c8a75863c6000031ab v: v3 --- [refs] | 2 +- trunk/drivers/thermal/rcar_thermal.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 32c7c6999a66..8d83e1284884 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1dc20828e674a781635286072bae909dc4e5c377 +refs/heads/master: 51d45d25948bdf7422958b92a2d91dc703b1a4cc diff --git a/trunk/drivers/thermal/rcar_thermal.c b/trunk/drivers/thermal/rcar_thermal.c index 4d6095b9f9df..8d7edd4c8228 100644 --- a/trunk/drivers/thermal/rcar_thermal.c +++ b/trunk/drivers/thermal/rcar_thermal.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -377,6 +378,9 @@ static int rcar_thermal_probe(struct platform_device *pdev) spin_lock_init(&common->lock); common->dev = dev; + pm_runtime_enable(dev); + pm_runtime_get_sync(dev); + irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (irq) { int ret; @@ -465,12 +469,16 @@ static int rcar_thermal_probe(struct platform_device *pdev) rcar_thermal_irq_disable(priv); } + pm_runtime_put_sync(dev); + pm_runtime_disable(dev); + return ret; } static int rcar_thermal_remove(struct platform_device *pdev) { struct rcar_thermal_common *common = platform_get_drvdata(pdev); + struct device *dev = &pdev->dev; struct rcar_thermal_priv *priv; rcar_thermal_for_each_priv(priv, common) { @@ -481,6 +489,9 @@ static int rcar_thermal_remove(struct platform_device *pdev) platform_set_drvdata(pdev, NULL); + pm_runtime_put_sync(dev); + pm_runtime_disable(dev); + return 0; }