From 0d7e7d236fe8869ea104f3f800e70d97d2e10440 Mon Sep 17 00:00:00 2001 From: zyc Date: Fri, 11 Jan 2013 14:52:29 +0800 Subject: [PATCH] camera:fix regulator_disable(ldo_28) executing warnings --- arch/arm/mach-rk30/board-rk30-sdk-camera.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rk30/board-rk30-sdk-camera.c b/arch/arm/mach-rk30/board-rk30-sdk-camera.c index b8caa107eee1..67f76f609c79 100644 --- a/arch/arm/mach-rk30/board-rk30-sdk-camera.c +++ b/arch/arm/mach-rk30/board-rk30-sdk-camera.c @@ -169,10 +169,12 @@ static void rk_cif_power(struct rk29camera_gpio_res *res,int on) printk("get cif ldo failed!\n"); return; } - if(on == 0){ - regulator_disable(ldo_28); + if(on == 0){ + while(regulator_is_enabled(ldo_28)>0) + regulator_disable(ldo_28); regulator_put(ldo_28); - regulator_disable(ldo_18); + while(regulator_is_enabled(ldo_18)>0) + regulator_disable(ldo_18); regulator_put(ldo_18); mdelay(10); if (camera_power != INVALID_GPIO) { -- 2.34.1