Skip to content

Commit

Permalink
platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
Browse files Browse the repository at this point in the history
Some newly added drivers do not set backlight type, as a result
/sys/class/backlight/<backlight>/type shows incorrect backlight type.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Corentin Chary <corentin.chary@gmail.com>
Cc: Yin Kangkai <kangkai.yin@intel.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
  • Loading branch information
Axel Lin authored and Matthew Garrett committed Jul 7, 2011
1 parent a50245a commit 60cfa09
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/platform/x86/asus-wmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,6 +1025,7 @@ static int asus_wmi_backlight_init(struct asus_wmi *asus)
return power;

memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = max;
bd = backlight_device_register(asus->driver->name,
&asus->platform_device->dev, asus,
Expand Down
1 change: 1 addition & 0 deletions drivers/platform/x86/intel_oaktrail.c
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ static int oaktrail_backlight_init(void)
struct backlight_properties props;

memset(&props, 0, sizeof(struct backlight_properties));
props.type = BACKLIGHT_PLATFORM;
props.max_brightness = OT_EC_BL_BRIGHTNESS_MAX;
bd = backlight_device_register(DRIVER_NAME,
&oaktrail_device->dev, NULL,
Expand Down

0 comments on commit 60cfa09

Please sign in to comment.