From 65ab9cd5738b8b4ce7249be23d52148113070a09 Mon Sep 17 00:00:00 2001 From: Loren HUANG Date: Wed, 9 Oct 2013 16:33:39 +0800 Subject: [PATCH] ENGR00283037 [gpu]Avoid gpu rmmod failure caused by regulator free failure The failure is caused by duplicate regulator resource free. New devm_xxx API will free the resource automatically after remove() is called. Signed-off-by: Loren HUANG Acked-by: Shawn Guo --- drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c index 888f35e9d0f8..ea0dc22f9375 100644 --- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c +++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_device.c @@ -1122,7 +1122,7 @@ gckGALDEVICE_Destroy( pm_runtime_disable(Device->pmdev); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) || LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0) +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,5,0) if (Device->gpu_regulator) { regulator_put(Device->gpu_regulator); Device->gpu_regulator = NULL; -- 2.39.5