diff mbox

backlight: lp855x: Make sure props struct is zeroed

Message ID 1440697275-4469-1-git-send-email-bjorn.andersson@sonymobile.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bjorn Andersson Aug. 27, 2015, 5:41 p.m. UTC
From: Werner Johansson <werner.johansson@sonymobile.com>

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>
---
 drivers/video/backlight/lp855x_bl.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Kim, Milo Aug. 27, 2015, 10:44 p.m. UTC | #1
On 8/28/2015 2:41 AM, Bjorn Andersson wrote:
> From: Werner Johansson <werner.johansson@sonymobile.com>
>
> The driver occasionally got stuck in suspend mode or other strange
> states as those parts of the props struct were never initialized.

Acked-by: Milo Kim <milo.kim@ti.com>

Thanks for catching this.
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Johansson, Werner Aug. 27, 2015, 10:51 p.m. UTC | #2
> > From: Werner Johansson <werner.johansson@sonymobile.com>
> >
> > The driver occasionally got stuck in suspend mode or other strange
> > states as those parts of the props struct were never initialized.
> 
> Acked-by: Milo Kim <milo.kim@ti.com>
> 
> Thanks for catching this.

You're most welcome! These issues can be difficult to track down, the stack is unpredictable.. 

/wj 
--
To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Lee Jones Sept. 19, 2015, 10:06 a.m. UTC | #3
On Thu, 27 Aug 2015, Bjorn Andersson wrote:

> From: Werner Johansson <werner.johansson@sonymobile.com>
> 
> 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>
> ---
>  drivers/video/backlight/lp855x_bl.c | 1 +
>  1 file changed, 1 insertion(+)

Applied, thanks.

> diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
> index 88116b493f3b..0a7f88ce1ab0 100644
> --- a/drivers/video/backlight/lp855x_bl.c
> +++ b/drivers/video/backlight/lp855x_bl.c
> @@ -282,6 +282,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;
>
diff mbox

Patch

diff --git a/drivers/video/backlight/lp855x_bl.c b/drivers/video/backlight/lp855x_bl.c
index 88116b493f3b..0a7f88ce1ab0 100644
--- a/drivers/video/backlight/lp855x_bl.c
+++ b/drivers/video/backlight/lp855x_bl.c
@@ -282,6 +282,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;