Messages in this thread |  | | Date | Tue, 23 Oct 2018 20:54:53 +0200 | From | Pavel Machek <> | Subject | Re: [PATCH v2 2/3] leds: upboard: Add LED support |
| |
Hi!
> > + led->field = devm_regmap_field_alloc(dev, regmap, conf); > > + if (IS_ERR(led->field)) > > + return PTR_ERR(led->field); > > + > > + led->cdev.max_brightness = 1; > > s/1/LED_ON/
Actually, I prefer constant 1 here, as it makes it immediately obvious this supports just 0/1.
Yes, LED_ON is also 1, but I had to grep the header files for that... (I thought it was 255).
Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [unhandled content-type:application/pgp-signature] |  |