Commit 60cfa098 authored by Axel Lin's avatar Axel Lin Committed by Matthew Garrett

platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM

Some newly added drivers do not set backlight type, as a result
/sys/class/backlight/<backlight>/type shows incorrect backlight type.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent a50245af
...@@ -1025,6 +1025,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus) ...@@ -1025,6 +1025,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus)
return power; return power;
memset(&props, 0, sizeof(struct backlight_properties)); memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = max; props.max_brightness = max;
bd = backlight_device_register(asus->driver->name, bd = backlight_device_register(asus->driver->name,
&asus->platform_device->dev, asus, &asus->platform_device->dev, asus,
......
...@@ -250,6 +250,7 @@ static int oaktrail_backlight_init(void) ...@@ -250,6 +250,7 @@ static int oaktrail_backlight_init(void)
struct backlight_properties props; struct backlight_properties props;
memset(&props, 0, sizeof(struct backlight_properties)); memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = OT_EC_BL_BRIGHTNESS_MAX; props.max_brightness = OT_EC_BL_BRIGHTNESS_MAX;
bd = backlight_device_register(DRIVER_NAME, bd = backlight_device_register(DRIVER_NAME,
&oaktrail_device->dev, NULL, &oaktrail_device->dev, NULL,
......
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