backlight: initialize struct backlight_properties properly
authorCorentin Chary <corentin.chary@gmail.com>
Tue, 29 May 2012 22:07:20 +0000 (15:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 May 2012 23:22:30 +0000 (16:22 -0700)
In all these files, the .power field was never correctly initialized.

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Cc: Jingoo Han <jg1.han@samsung.com>
Cc: Dave Airlie <airlied@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/platform/x86/toshiba_acpi.c
drivers/video/backlight/da903x_bl.c
drivers/video/backlight/pcf50633-backlight.c
drivers/video/backlight/wm831x_bl.c
drivers/video/omap2/displays/panel-acx565akm.c

index ee79ce64d9dfbdb8a99061f59232325b8c57f6d3..57787d87d9a4780df7e6d3a5d757aa7179545445 100644 (file)
@@ -1104,6 +1104,7 @@ static int __devinit toshiba_acpi_add(struct acpi_device *acpi_dev)
 
        mutex_init(&dev->mutex);
 
+       memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_PLATFORM;
        props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
        dev->backlight_dev = backlight_device_register("toshiba",
index 30e19681a30b452a9c06181b83d2f448c10c4db1..573c7ece0fde88f7b1990bd3989f17ccd8a86ed9 100644 (file)
@@ -136,6 +136,7 @@ static int da903x_backlight_probe(struct platform_device *pdev)
                da903x_write(data->da903x_dev, DA9034_WLED_CONTROL2,
                                DA9034_WLED_ISET(pdata->output_current));
 
+       memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_RAW;
        props.max_brightness = max_brightness;
        bl = backlight_device_register(pdev->name, data->da903x_dev, data,
index c65853cb9740633ab9d1ff6b5ba7a659fac276e1..c092159f438344dab682d8a1410169b45524d2ad 100644 (file)
@@ -111,6 +111,7 @@ static int __devinit pcf50633_bl_probe(struct platform_device *pdev)
        if (!pcf_bl)
                return -ENOMEM;
 
+       memset(&bl_props, 0, sizeof(bl_props));
        bl_props.type = BACKLIGHT_RAW;
        bl_props.max_brightness = 0x3f;
        bl_props.power = FB_BLANK_UNBLANK;
index 5d365deb5f8220a31a4e2e0562dbf861d9270f06..9e5517a3a52baeea6546e0d24dc4a8ca2e5ef732 100644 (file)
@@ -194,6 +194,7 @@ static int wm831x_backlight_probe(struct platform_device *pdev)
        data->current_brightness = 0;
        data->isink_reg = isink_reg;
 
+       memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_RAW;
        props.max_brightness = max_isel;
        bl = backlight_device_register("wm831x", &pdev->dev, data,
index d26f37ac69d87d882eb7a2a5d539a7e90e55c4fa..74e7cf078505650498387f4c7e43292419fcf60c 100644 (file)
@@ -532,6 +532,7 @@ static int acx_panel_probe(struct omap_dss_device *dssdev)
 
        /*------- Backlight control --------*/
 
+       memset(&props, 0, sizeof(props));
        props.fb_blank = FB_BLANK_UNBLANK;
        props.power = FB_BLANK_UNBLANK;
        props.type = BACKLIGHT_RAW;