MGS-1633 [#2235] Replace CONFIG_PM_RUNTIME with CONFIG_PM
authorShawn Xiao <b49994@freescale.com>
Mon, 22 Feb 2016 06:48:25 +0000 (14:48 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 20:46:57 +0000 (15:46 -0500)
Since 4.1, linux kernel has dropped CONFIG_PM_RUNTIME macro. And
CONFIG_PM is used instead. GPU driver should be synced with the change.

Date Feb 22, 2016

Signed-off-by: Shawn Xiao <b49994@freescale.com>
drivers/mxc/gpu-viv/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx6.c

index b96d6db..9218982 100644 (file)
@@ -1417,7 +1417,6 @@ int set_clock(int gpu, int enable)
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
 #ifdef CONFIG_PM
-#ifdef CONFIG_PM_RUNTIME
 static int gpu_runtime_suspend(struct device *dev)
 {
     release_bus_freq(BUS_FREQ_HIGH);
@@ -1429,7 +1428,6 @@ static int gpu_runtime_resume(struct device *dev)
     request_bus_freq(BUS_FREQ_HIGH);
     return 0;
 }
-#endif
 
 static struct dev_pm_ops gpu_pm_ops;
 #endif
@@ -1449,7 +1447,7 @@ static int adjust_platform_driver(struct platform_driver *driver)
     memcpy(&gpu_pm_ops, driver->driver.pm, sizeof(struct dev_pm_ops));
 
     /* Add runtime PM callback. */
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
     gpu_pm_ops.runtime_suspend = gpu_runtime_suspend;
     gpu_pm_ops.runtime_resume = gpu_runtime_resume;
     gpu_pm_ops.runtime_idle = NULL;