Sfoglia il codice sorgente

asus-laptop: Fix the led behavior with value > 1

Fix http://bugzilla.kernel.org/show_bug.cgi?id=11613 .

Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Len Brown <len.brown@intel.com>
Corentin Chary 16 anni fa
parent
commit
e3deda9c87
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      drivers/misc/asus-laptop.c

+ 1 - 1
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)	\