From: Pavel Machek <pavel@ucw.cz>
To: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Andi Shyti <andi.shyti@samsung.com>,
Richard Purdie <rpurdie@rpsys.net>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
Andi Shyti <andi@etezian.org>
Subject: Re: [PATCH] leds: add LED_ON brightness as boolean value
Date: Wed, 4 Jan 2017 23:42:30 +0100 [thread overview]
Message-ID: <20170104224230.GA18891@amd> (raw)
In-Reply-To: <b3ac3619-3b80-a9ab-fa0c-b56685291fd6@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]
Hi!
> > 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@samsung.com>
> > ---
> > include/linux/leds.h | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/include/linux/leds.h b/include/linux/leds.h
> > index 569cb531094c..0258f9c49034 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,
>
> Now lack of explicit value assignment to LED_ON looks weird
> since it is surrounded by other initializer values.
> I'd prefer to have "LED_ON = 1," in this line.
Yes, please, good idea.
(Documentation already says on/off leds should use 0/1. Good.)
With "= 1" added for consistency,
Acked-by: Pavel Machek <pavel@ucw.cz>
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
prev parent reply other threads:[~2017-01-04 22:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20170104134122epcas1p48ee63a75c2e159b06d792ec8bc7d4e6d@epcas1p4.samsung.com>
2017-01-04 13:41 ` [PATCH] leds: add LED_ON brightness as boolean value Andi Shyti
2017-01-04 19:59 ` Jacek Anaszewski
2017-01-04 22:42 ` Pavel Machek [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170104224230.GA18891@amd \
--to=pavel@ucw.cz \
--cc=andi.shyti@samsung.com \
--cc=andi@etezian.org \
--cc=jacek.anaszewski@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=rpurdie@rpsys.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).