]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/backlight: initialize struct backlight_properties properly
authorCorentin Chary <corentin.chary@gmail.com>
Tue, 22 May 2012 09:29:46 +0000 (10:29 +0100)
committerDave Airlie <airlied@redhat.com>
Tue, 22 May 2012 09:29:46 +0000 (10:29 +0100)
The power field was never correctly initialized.

[airlied: just took the two drm specific bits]

Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/i915/intel_panel.c
drivers/gpu/drm/radeon/radeon_legacy_encoders.c

index 2b2e011e9055f7f9b9bdb9fc066410caaed4d68e..2a1625d84a69cc86eebe21c7330a1d18907c51d0 100644 (file)
@@ -368,6 +368,7 @@ int intel_panel_setup_backlight(struct drm_device *dev)
        else
                return -ENODEV;
 
+       memset(&props, 0, sizeof(props));
        props.type = BACKLIGHT_RAW;
        props.max_brightness = intel_panel_get_max_backlight(dev);
        dev_priv->backlight =
index 42db254f6bb04e13f86c8ba238e6be7685a20578..a0c82229e8f07203b2fd0bb41a928d637e521f65 100644 (file)
@@ -369,6 +369,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
                goto error;
        }
 
+       memset(&props, 0, sizeof(props));
        props.max_brightness = MAX_RADEON_LEVEL;
        props.type = BACKLIGHT_RAW;
        bd = backlight_device_register("radeon_bl", &drm_connector->kdev,