gpu: arm : mali400: replace CONFIG_PM_RUNTIME to CONFIG_PM
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Fri, 27 Mar 2015 05:10:47 +0000 (14:10 +0900)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 13 Apr 2015 10:44:22 +0000 (12:44 +0200)
After commit 464ed18ebdb6 ("PM: Eliminate CONFIG_PM_RUNTIME") which
is applied kernel version 3.19, PM_RUNTIME is eliminated. So this
patch replaces CONFIG_PM_RUNTIME to CONFIG_PM for kernel version
larger than 3.19.

Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c
drivers/gpu/arm/mali400/mali/linux/mali_osk_pm.c
drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_kernel_linux.c
drivers/gpu/arm/mali400/r4p0_rel0/linux/mali_osk_pm.c

index b1f286263cb8f4754f13c7f4b4d44d35190db0a8..7dbd31581fe3efccd36b74128724cb8aae89d4fa 100644 (file)
@@ -137,7 +137,8 @@ static int mali_remove(struct platform_device *pdev);
 static int mali_driver_suspend_scheduler(struct device *dev);
 static int mali_driver_resume_scheduler(struct device *dev);
 
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 static int mali_driver_runtime_suspend(struct device *dev);
 static int mali_driver_runtime_resume(struct device *dev);
 static int mali_driver_runtime_idle(struct device *dev);
@@ -163,7 +164,8 @@ struct pm_ext_ops mali_dev_ext_pm_ops =
 #else
 static const struct dev_pm_ops mali_dev_pm_ops =
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        .runtime_suspend = mali_driver_runtime_suspend,
        .runtime_resume = mali_driver_runtime_resume,
        .runtime_idle = mali_driver_runtime_idle,
@@ -396,7 +398,8 @@ static int mali_driver_resume_scheduler(struct device *dev)
        return 0;
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 static int mali_driver_runtime_suspend(struct device *dev)
 {
        mali_pm_runtime_suspend();
index f2351bdae37699ce4bf3a6302d6b1de19ff6b15a..368cb1f2cce3967dd60e30b22a45518d285beb11 100644 (file)
  */
 
 #include <linux/sched.h>
+#include <linux/version.h>
 
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 #include <linux/pm_runtime.h>
-#endif /* CONFIG_PM_RUNTIME */
+#endif
 #include <linux/platform_device.h>
 #include <linux/version.h>
 #include "mali_osk.h"
@@ -39,7 +41,8 @@ void _mali_osk_pm_dev_disable(void) /* @@@@ todo: change to term of some kind */
 /* Can NOT run in atomic context */
 _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        int err;
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        err = pm_runtime_get_sync(&(mali_platform_device->dev));
@@ -60,7 +63,8 @@ _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
 /* Can run in atomic context */
 void _mali_osk_pm_dev_ref_dec(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        _mali_osk_atomic_dec(&mali_pm_ref_count);
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
@@ -76,7 +80,8 @@ void _mali_osk_pm_dev_ref_dec(void)
 /* Can run in atomic context */
 mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        u32 ref;
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        pm_runtime_get_noresume(&(mali_platform_device->dev));
@@ -91,7 +96,8 @@ mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
 /* Can run in atomic context */
 void _mali_osk_pm_dev_ref_dec_no_power_on(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
        pm_runtime_put_autosuspend(&(mali_platform_device->dev));
index b959179d775af2e18cf82de108d77aa27c81e7ae..b6002449a7e23fc91c93bcd2db24811d64579bc5 100644 (file)
@@ -140,7 +140,8 @@ static int mali_remove(struct platform_device *pdev);
 static int mali_driver_suspend_scheduler(struct device *dev);
 static int mali_driver_resume_scheduler(struct device *dev);
 
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 static int mali_driver_runtime_suspend(struct device *dev);
 static int mali_driver_runtime_resume(struct device *dev);
 static int mali_driver_runtime_idle(struct device *dev);
@@ -164,7 +165,8 @@ struct pm_ext_ops mali_dev_ext_pm_ops = {
 };
 #else
 static const struct dev_pm_ops mali_dev_pm_ops = {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        .runtime_suspend = mali_driver_runtime_suspend,
        .runtime_resume = mali_driver_runtime_resume,
        .runtime_idle = mali_driver_runtime_idle,
@@ -501,7 +503,8 @@ static int mali_driver_resume_scheduler(struct device *dev)
        return 0;
 }
 
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 static int mali_driver_runtime_suspend(struct device *dev)
 {
        mali_pm_runtime_suspend();
index 59130a1933058edfc6b95c6e2ee59672f3118543..edb577cbae7f4daf505385c96d9451999dda94ef 100644 (file)
  */
 
 #include <linux/sched.h>
-
-#ifdef CONFIG_PM_RUNTIME
+#include <linux/version.h>
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
 #include <linux/pm_runtime.h>
-#endif /* CONFIG_PM_RUNTIME */
+#endif
 #include <linux/platform_device.h>
-#include <linux/version.h>
 #include "mali_osk.h"
 #include "mali_kernel_common.h"
 #include "mali_kernel_linux.h"
@@ -39,7 +39,8 @@ void _mali_osk_pm_dev_disable(void)
 /* Can NOT run in atomic context */
 _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        int err;
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        err = pm_runtime_get_sync(&(mali_platform_device->dev));
@@ -59,7 +60,8 @@ _mali_osk_errcode_t _mali_osk_pm_dev_ref_add(void)
 /* Can run in atomic context */
 void _mali_osk_pm_dev_ref_dec(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        _mali_osk_atomic_dec(&mali_pm_ref_count);
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
@@ -75,7 +77,8 @@ void _mali_osk_pm_dev_ref_dec(void)
 /* Can run in atomic context */
 mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        u32 ref;
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
        pm_runtime_get_noresume(&(mali_platform_device->dev));
@@ -90,7 +93,8 @@ mali_bool _mali_osk_pm_dev_ref_add_no_power_on(void)
 /* Can run in atomic context */
 void _mali_osk_pm_dev_ref_dec_no_power_on(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        MALI_DEBUG_ASSERT_POINTER(mali_platform_device);
 #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,37))
        pm_runtime_put_autosuspend(&(mali_platform_device->dev));
@@ -103,7 +107,8 @@ void _mali_osk_pm_dev_ref_dec_no_power_on(void)
 
 void _mali_osk_pm_dev_barrier(void)
 {
-#ifdef CONFIG_PM_RUNTIME
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,19,0) && defined(CONFIG_PM_RUNTIME))\
+       || defined(CONFIG_PM)
        pm_runtime_barrier(&(mali_platform_device->dev));
 #endif
 }