camera:fix regulator_disable(ldo_28) executing warnings
authorzyc <zyc@rock-chips.com>
Fri, 11 Jan 2013 06:52:29 +0000 (14:52 +0800)
committerzyc <zyc@rock-chips.com>
Fri, 11 Jan 2013 06:52:29 +0000 (14:52 +0800)
arch/arm/mach-rk30/board-rk30-sdk-camera.c

index b8caa107eee1e61e801fffef6b1cc1660eb01801..67f76f609c790a77e418add080393b8ac0a9ed67 100644 (file)
@@ -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)  {