Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 =
+1 −0
Original line number Diff line number Diff line
@@ -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,