summaryrefslogtreecommitdiff
path: root/arch/arm/plat-samsung/dev-backlight.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2013-08-30 14:19:52 +0400
committerThierry Reding <thierry.reding@gmail.com>2013-10-16 11:05:57 +0400
commita63652f1a7b5b04545bfe0ebc9e54f32bde05caf (patch)
tree69822de3fbb36f603af2d8c0c0e371decd0c94dd /arch/arm/plat-samsung/dev-backlight.c
parentdb01120c5f6cb1d8c6533a49b009f08a73852498 (diff)
downloadlinux-a63652f1a7b5b04545bfe0ebc9e54f32bde05caf.tar.xz
ARM: SAMSUNG: Initialize PWM backlight enable_gpio field
The GPIO API defines 0 as being a valid GPIO number, so this field needs to be initialized explicitly. Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'arch/arm/plat-samsung/dev-backlight.c')
-rw-r--r--arch/arm/plat-samsung/dev-backlight.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/arm/plat-samsung/dev-backlight.c b/arch/arm/plat-samsung/dev-backlight.c
index d51f9565567c..be4ad0b21c08 100644
--- a/arch/arm/plat-samsung/dev-backlight.c
+++ b/arch/arm/plat-samsung/dev-backlight.c
@@ -70,6 +70,7 @@ static struct samsung_bl_drvdata samsung_dfl_bl_data __initdata = {
.max_brightness = 255,
.dft_brightness = 255,
.pwm_period_ns = 78770,
+ .enable_gpio = -1,
.init = samsung_bl_init,
.exit = samsung_bl_exit,
},
@@ -121,6 +122,10 @@ void __init samsung_bl_set(struct samsung_bl_gpio_info *gpio_info,
samsung_bl_data->lth_brightness = bl_data->lth_brightness;
if (bl_data->pwm_period_ns)
samsung_bl_data->pwm_period_ns = bl_data->pwm_period_ns;
+ if (bl_data->enable_gpio >= 0)
+ samsung_bl_data->enable_gpio = bl_data->enable_gpio;
+ if (bl_data->enable_gpio_flags)
+ samsung_bl_data->enable_gpio_flags = bl_data->enable_gpio_flags;
if (bl_data->init)
samsung_bl_data->init = bl_data->init;
if (bl_data->notify)