summaryrefslogtreecommitdiff
path: root/arch/arm/mach-tegra/board-ventana-panel.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-tegra/board-ventana-panel.c')
-rw-r--r--arch/arm/mach-tegra/board-ventana-panel.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/arch/arm/mach-tegra/board-ventana-panel.c b/arch/arm/mach-tegra/board-ventana-panel.c
index d2d89392e1c5..d507dea88813 100644
--- a/arch/arm/mach-tegra/board-ventana-panel.c
+++ b/arch/arm/mach-tegra/board-ventana-panel.c
@@ -1,7 +1,7 @@
/*
* arch/arm/mach-tegra/board-ventana-panel.c
*
- * Copyright (c) 2010-2012 NVIDIA Corporation.
+ * Copyright (c) 2010-2013 NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -48,6 +48,7 @@
#define ventana_lvds_to_bl_ms 200
static struct regulator *pnl_pwr;
+static struct regulator *vdd_ldo4;
#ifdef CONFIG_TEGRA_DC
static struct regulator *ventana_hdmi_reg = NULL;
@@ -104,11 +105,17 @@ static struct platform_device ventana_backlight_device = {
#ifdef CONFIG_TEGRA_DC
static int ventana_panel_enable(void)
{
- struct regulator *reg = regulator_get(NULL, "vdd_ldo4");
-
- if (!reg) {
- regulator_enable(reg);
- regulator_put(reg);
+ if (vdd_ldo4 == NULL) {
+ vdd_ldo4 = regulator_get(NULL, "vdd_ldo4");
+
+ if (IS_ERR(vdd_ldo4)) {
+ pr_err("%s: couldn't get regulator vdd_ldo4: %ld\n",
+ __func__, PTR_ERR(vdd_ldo4));
+ } else {
+ regulator_enable(vdd_ldo4);
+ regulator_disable(vdd_ldo4);
+ regulator_put(vdd_ldo4);
+ }
}
if (pnl_pwr == NULL) {