[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20170104224230.GA18891@amd>
Date: Wed, 4 Jan 2017 23:42:30 +0100
From: Pavel Machek <pavel@....cz>
To: Jacek Anaszewski <jacek.anaszewski@...il.com>
Cc: Andi Shyti <andi.shyti@...sung.com>,
Richard Purdie <rpurdie@...ys.net>, linux-leds@...r.kernel.org,
linux-kernel@...r.kernel.org, Andi Shyti <andi@...zian.org>
Subject: Re: [PATCH] leds: add LED_ON brightness as boolean value
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@...sung.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@....cz>
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Download attachment "signature.asc" of type "application/pgp-signature" (182 bytes)
Powered by blists - more mailing lists