lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Thu, 05 Jan 2017 11:34:12 +0900
From:   Andi Shyti <andi.shyti@...sung.com>
To:     Richard Purdie <rpurdie@...ys.net>,
        Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Pavel Machek <pavel@....cz>
Cc:     Jaechul Lee <jcsing.lee@...sung.com>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org, Andi Shyti <andi.shyti@...sung.com>,
        Andi Shyti <andi@...zian.org>
Subject: [PATCH v2] leds: add LED_ON brightness as boolean value

Some devices do not handle the led brightness or simply don't
care about it. Conceptually said devices want to just switch on
or off the led. It is useless in this case to have a 255 range
of brightness, while just having an LED_ON and LED_OFF improves
the boolean meaning of the led status.

Signed-off-by: Andi Shyti <andi.shyti@...sung.com>
Acked-by: Pavel Machek <pavel@....cz>
---
Hi,

Thanks Pavel and Jacek for your review.

Differences from V1
- used explicit assignement of LED_ON in the enum
- added Pavel's ack

Andi

 include/linux/leds.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/leds.h b/include/linux/leds.h
index 569cb531094c..bb50d0151e75 100644
--- a/include/linux/leds.h
+++ b/include/linux/leds.h
@@ -27,6 +27,7 @@ struct device;
 
 enum led_brightness {
 	LED_OFF		= 0,
+	LED_ON		= 1,
 	LED_HALF	= 127,
 	LED_FULL	= 255,
 };
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ