* [PATCH] platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM
@ 2011-06-29 3:43 Axel Lin
0 siblings, 0 replies; only message in thread
From: Axel Lin @ 2011-06-29 3:43 UTC (permalink / raw)
To: linux-kernel
Cc: Corentin Chary, Yin Kangkai, Matthew Garrett, acpi4asus-user,
platform-driver-x86
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>
---
drivers/platform/x86/asus-wmi.c | 1 +
drivers/platform/x86/intel_oaktrail.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 00460cb..3c7857c7 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -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,
diff --git a/drivers/platform/x86/intel_oaktrail.c b/drivers/platform/x86/intel_oaktrail.c
index e936364..7f88c79 100644
--- a/drivers/platform/x86/intel_oaktrail.c
+++ b/drivers/platform/x86/intel_oaktrail.c
@@ -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,
--
1.7.4.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-06-29 3:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-29 3:43 [PATCH] platform-drivers-x86: set backlight type to BACKLIGHT_PLATFORM Axel Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox