]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
fbdev: sh_mobile_meram: Enable runtime PM
authorDamian Hobson-Garcia <dhobsong@igel.co.jp>
Mon, 4 Jul 2011 06:06:11 +0000 (08:06 +0200)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 19 Aug 2011 06:11:11 +0000 (08:11 +0200)
Signed-off-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
drivers/video/sh_mobile_meram.c

index cc7d7329dc151af821153feb999998e42460267e..34efd8a29f59eca44c7afd5760946210c838ed83 100644 (file)
@@ -12,6 +12,7 @@
 #include <linux/kernel.h>
 #include <linux/module.h>
 #include <linux/device.h>
+#include <linux/pm_runtime.h>
 #include <linux/io.h>
 #include <linux/slab.h>
 #include <linux/platform_device.h>
@@ -515,6 +516,8 @@ static int __devinit sh_mobile_meram_probe(struct platform_device *pdev)
        if (pdata->addr_mode == SH_MOBILE_MERAM_MODE1)
                meram_write_reg(priv->base, MEVCR1, 1 << 29);
 
+       pm_runtime_enable(&pdev->dev);
+
        dev_info(&pdev->dev, "sh_mobile_meram initialized.");
 
        return 0;
@@ -530,6 +533,8 @@ static int sh_mobile_meram_remove(struct platform_device *pdev)
 {
        struct sh_mobile_meram_priv *priv = platform_get_drvdata(pdev);
 
+       pm_runtime_disable(&pdev->dev);
+
        if (priv->base)
                iounmap(priv->base);