device->pmdev = pdev;
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- device->gpu_regulator =(struct regulator*)0xffffffff ;
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
/*get gpu regulator*/
device->gpu_regulator = regulator_get(pdev, "cpu_vddgpu");
if (IS_ERR(device->gpu_regulator)) {
pm_runtime_disable(Device->pmdev);
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,5,0)
- /*NULL*/
-#else
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
if (Device->gpu_regulator) {
regulator_put(Device->gpu_regulator);
Device->gpu_regulator = NULL;
}
if((Power == gcvTRUE) && (oldPowerState == gcvFALSE))
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
- if(!IS_ERR(Os->device->gpu_regulator))
- regulator_enable(Os->device->gpu_regulator);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
+ if(!IS_ERR(Os->device->gpu_regulator))
+ regulator_enable(Os->device->gpu_regulator);
#else
- imx_gpc_power_up_pu(true);
+ imx_gpc_power_up_pu(true);
#endif
#ifdef CONFIG_PM
pm_runtime_put_sync(Os->device->pmdev);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
- if(!IS_ERR(Os->device->gpu_regulator))
- regulator_disable(Os->device->gpu_regulator);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0)
+ if(!IS_ERR(Os->device->gpu_regulator))
+ regulator_disable(Os->device->gpu_regulator);
#else
- imx_gpc_power_up_pu(false);
+ imx_gpc_power_up_pu(false);
#endif
}
/* TODO: Put your code here. */