summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPrayas Mohanty <pmohanty@nvidia.com>2011-06-22 16:35:43 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2011-11-30 21:47:09 -0800
commitbd027678d1bdf95544b7f14df0e8019bf95596d9 (patch)
treee0649fb649cfef46c07d9ca716451e027a670527
parent14b876ce6cbf9b9174999487d7e894139798d820 (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 Original-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> Rebase-Id: R74efd1bf6a77b71f19a32058f55ba094e213648d
-rw-r--r--arch/arm/mach-tegra/board-cardhu-sensors.c8
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),