From e81dd8a3500fea94ce8786554cbc29bc6b2a9207 Mon Sep 17 00:00:00 2001 From: Dominik Sliwa Date: Tue, 27 Mar 2018 16:36:23 +0200 Subject: apalis-tk1: handle backlight in the device tree Signed-off-by: Dominik Sliwa Acked-by: Marcel Ziswiler --- drivers/video/tegra/dc/of_dc.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) (limited to 'drivers') diff --git a/drivers/video/tegra/dc/of_dc.c b/drivers/video/tegra/dc/of_dc.c index ee1dc1f81f87..1f38c3e8e36b 100644 --- a/drivers/video/tegra/dc/of_dc.c +++ b/drivers/video/tegra/dc/of_dc.c @@ -73,7 +73,6 @@ static struct regulator *of_hdmi_vddio; static struct regulator *of_hdmi_reg; static struct regulator *of_hdmi_pll; static struct regulator *of_lvds_dp_reg; -static struct regulator *of_lvds_bl_reg; #ifdef CONFIG_TEGRA_DC_CMU static struct tegra_dc_cmu default_cmu = { @@ -1647,21 +1646,7 @@ static int dc_lvds_enable(struct device *dev) of_lvds_dp_reg = NULL; return ret; } - - if (!of_lvds_bl_reg) { - of_lvds_bl_reg = regulator_get(dev, "vdd_lcd_bl"); - if (IS_ERR_OR_NULL(of_lvds_bl_reg)) { - pr_err("lvds: couldn't get regulator vdd_lcd_bl\n"); - of_lvds_bl_reg = NULL; - } - } - - if (of_lvds_bl_reg) { - if (regulator_enable(of_lvds_bl_reg) < 0) - pr_err("vdd_lcd_bl failed to enable\n"); - } - - return 0; + return ret; } static int dc_lvds_disable(void) @@ -1671,11 +1656,6 @@ static int dc_lvds_disable(void) regulator_put(of_lvds_dp_reg); of_lvds_dp_reg = NULL; } - if (of_lvds_bl_reg) { - regulator_disable(of_lvds_bl_reg); - regulator_put(of_lvds_bl_reg); - of_lvds_bl_reg = NULL; - } return 0; } -- cgit v1.2.3