platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
authorAxel Lin <axel.lin@gmail.com>
Wed, 29 Jun 2011 03:43:30 +0000 (11:43 +0800)
committerMatthew Garrett <mjg@redhat.com>
Thu, 7 Jul 2011 15:27:17 +0000 (11:27 -0400)
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>
drivers/platform/x86/asus-wmi.c
drivers/platform/x86/intel_oaktrail.c

index 00460cb9587b753119696647844759200a1bc8c8..3c7857c71a230e12b2fc1bac6446c08af0e0c893 100644 (file)
@@ -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,
index e936364a609d452f18534bf02f1e57647ffde97c..7f88c7923fc6ab18ad8bc674da4ee96411bbf2fc 100644 (file)
@@ -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,