From: Corentin Chary Date: Wed, 24 Sep 2008 08:35:55 +0000 (+0200) Subject: asus-laptop: Fix the led behavior with value > 1 X-Git-Tag: v2.6.27.15~9 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a21e824081db7004d321e201872c04d82663f6eb;p=thirdparty%2Fkernel%2Fstable.git asus-laptop: Fix the led behavior with value > 1 commit e3deda9c87ac5eef2b5d18cd0b5511370979ca26 upstream. Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 . Signed-off-by: Corentin Chary Signed-off-by: Len Brown Cc: Thomas Renninger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/asus-laptop.c b/drivers/misc/asus-laptop.c index c758c2a401be4..95965a74dc201 100644 --- a/drivers/misc/asus-laptop.c +++ b/drivers/misc/asus-laptop.c @@ -351,7 +351,7 @@ static void write_status(acpi_handle handle, int out, int mask) static void object##_led_set(struct led_classdev *led_cdev, \ enum led_brightness value) \ { \ - object##_led_wk = value; \ + object##_led_wk = (value > 0) ? 1 : 0; \ queue_work(led_workqueue, &object##_led_work); \ } \ static void object##_led_update(struct work_struct *ignored) \