backlight: lp855x: Make sure props struct is zeroed
authorWerner Johansson <werner.johansson@sonymobile.com>
Thu, 27 Aug 2015 17:41:15 +0000 (10:41 -0700)
committerLee Jones <lee.jones@linaro.org>
Mon, 5 Oct 2015 12:47:42 +0000 (13:47 +0100)
The driver occasionally got stuck in suspend mode or other strange
states as those parts of the props struct were never initialized.

Signed-off-by: Werner Johansson <werner.johansson@sonymobile.com>
Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Acked-by: Milo Kim <milo.kim@ti.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/video/backlight/lp855x_bl.c

index f88df9ec08d044091d7c1b531499a46309012904..daca9e6a2bb31590071cfc7100e4c1ee8ca4f1ec 100644 (file)
@@ -283,6 +283,7 @@ static int lp855x_backlight_register(struct lp855x *lp)
        struct lp855x_platform_data *pdata = lp->pdata;
        const char *name = pdata->name ? : DEFAULT_BL_NAME;
 
+       memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_PLATFORM;
        props.max_brightness = MAX_BRIGHTNESS;
 
This page took 0.025437 seconds and 5 git commands to generate.