Commit af437cfd authored by Corentin Chary's avatar Corentin Chary Committed by Dave Airlie

drm/backlight: initialize struct backlight_properties properly

The power field was never correctly initialized.

[airlied: just took the two drm specific bits]
Signed-off-by: default avatarCorentin Chary <corentin.chary@gmail.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 6225ee05
...@@ -368,6 +368,7 @@ int intel_panel_setup_backlight(struct drm_device *dev) ...@@ -368,6 +368,7 @@ int intel_panel_setup_backlight(struct drm_device *dev)
else else
return -ENODEV; return -ENODEV;
memset(&props, 0, sizeof(props));
props.type = BACKLIGHT_RAW; props.type = BACKLIGHT_RAW;
props.max_brightness = intel_panel_get_max_backlight(dev); props.max_brightness = intel_panel_get_max_backlight(dev);
dev_priv->backlight = dev_priv->backlight =
......
...@@ -369,6 +369,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder, ...@@ -369,6 +369,7 @@ void radeon_legacy_backlight_init(struct radeon_encoder *radeon_encoder,
goto error; goto error;
} }
memset(&props, 0, sizeof(props));
props.max_brightness = MAX_RADEON_LEVEL; props.max_brightness = MAX_RADEON_LEVEL;
props.type = BACKLIGHT_RAW; props.type = BACKLIGHT_RAW;
bd = backlight_device_register("radeon_bl", &drm_connector->kdev, bd = backlight_device_register("radeon_bl", &drm_connector->kdev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment