Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 374549
b: refs/heads/master
c: 51d45d2
h: refs/heads/master
i:
  374547: b1bc229
v: v3
  • Loading branch information
Kuninori Morimoto authored and Zhang Rui committed Apr 2, 2013
1 parent 34666ed commit db7ce04
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1dc20828e674a781635286072bae909dc4e5c377
refs/heads/master: 51d45d25948bdf7422958b92a2d91dc703b1a4cc
11 changes: 11 additions & 0 deletions trunk/drivers/thermal/rcar_thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/io.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/reboot.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit db7ce04

Please sign in to comment.