diff options
author | Prayas Mohanty <pmohanty@nvidia.com> | 2011-06-22 16:35:43 +0530 |
---|---|---|
committer | Niket Sirsi <nsirsi@nvidia.com> | 2011-06-24 21:05:24 -0700 |
commit | 92cdbc8a7d1156af7dadf0b0c2c089f8ba971393 (patch) | |
tree | f337d43b634398de2e55c33bf7eb3cd95a376c82 | |
parent | 1248c1d9deff8bdf6a547da0ea0d5481a9a04ddf (diff) |
arm: tegra: cardhu: handle regulator_get error
For sh532u, when regulator_get fails, it still returns
unwanted value. Reset regulator variable to NULL and
return error.
bug 841078
Change-Id: I7265b2b5ca40405c92555a242d7d39f5dfe2bb07
Reviewed-on: http://git-master/r/37848
Reviewed-by: Alok Chauhan <alokc@nvidia.com>
Tested-by: Prayas Mohanty <pmohanty@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-sensors.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-sensors.c b/arch/arm/mach-tegra/board-cardhu-sensors.c index 2bbb6b3d815c..9c6f47b30dbb 100644 --- a/arch/arm/mach-tegra/board-cardhu-sensors.c +++ b/arch/arm/mach-tegra/board-cardhu-sensors.c @@ -397,6 +397,8 @@ static int sh532u_power_control(void *cdata, int is_enable) { if (WARN_ON(IS_ERR_OR_NULL(vdd_2v8_cam1_af))) { pr_err("%s: couldn't get regulator vdd_2v8_cam1_af:" " %ld\n", __func__, PTR_ERR(vdd_2v8_cam1_af)); + + vdd_2v8_cam1_af = NULL; return -ENODEV; } } @@ -701,15 +703,15 @@ struct ov5650_gpios { static struct ov5650_gpios ov5650_gpio_keys[] = { [0] = OV5650_GPIO("cam1_pwdn", CAM1_PWR_DN_GPIO, 0), [1] = OV5650_GPIO("cam1_rst_lo", CAM1_RST_L_GPIO, 1), - [2] = OV5650_GPIO("cam1_af_pwdn_lo", CAM1_AF_PWR_DN_L_GPIO, 1), + [2] = OV5650_GPIO("cam1_af_pwdn_lo", CAM1_AF_PWR_DN_L_GPIO, 0), [3] = OV5650_GPIO("cam1_ldo_shdn_lo", CAM1_LDO_SHUTDN_L_GPIO, 1), [4] = OV5650_GPIO("cam2_pwdn", CAM2_PWR_DN_GPIO, 0), [5] = OV5650_GPIO("cam2_rst_lo", CAM2_RST_L_GPIO, 1), - [6] = OV5650_GPIO("cam2_af_pwdn_lo", CAM2_AF_PWR_DN_L_GPIO, 1), + [6] = OV5650_GPIO("cam2_af_pwdn_lo", CAM2_AF_PWR_DN_L_GPIO, 0), [7] = OV5650_GPIO("cam2_ldo_shdn_lo", CAM2_LDO_SHUTDN_L_GPIO, 1), [8] = OV5650_GPIO("cam3_pwdn", CAM_FRONT_PWR_DN_GPIO, 0), [9] = OV5650_GPIO("cam3_rst_lo", CAM_FRONT_RST_L_GPIO, 1), - [10] = OV5650_GPIO("cam3_af_pwdn_lo", CAM_FRONT_AF_PWR_DN_L_GPIO, 1), + [10] = OV5650_GPIO("cam3_af_pwdn_lo", CAM_FRONT_AF_PWR_DN_L_GPIO, 0), [11] = OV5650_GPIO("cam3_ldo_shdn_lo", CAM_FRONT_LDO_SHUTDN_L_GPIO, 1), [12] = OV5650_GPIO("cam_led_exp", CAM_FRONT_LED_EXP, 1), [13] = OV5650_GPIO("cam_led_rear_exp", CAM_SNN_LED_REAR_EXP, 1), |