Re: [PATCH v2] Input: Make ADS7846 independent on regulator

From
Mark Brown <hidden>
Date
2010-10-05 22:52:14
Also in
linux-arm-kernel, lkml
Reply to
Linus Walleij, 2010-10-05
On Wed, Oct 06, 2010 at 12:09:39AM +0200, Linus Walleij wrote:
This wrapper function will accept non-existing regulators and
not treat them as errors. Consumers will have to NULL-check their
regulators.
No, this is actively unhelpful.  If consumers can null check their
regulators then they can just as well do an IS_ERR() check and if we
just eat null pointers like this then the API doesn't degrade gracefully
when it can't implement things - for example, your regulator_set_voltage() 
will report success when it fails to set a voltage which is going to
upset any consumer that thinks it did actually change the current
voltage.

The existing dummy regulator support already does all this in a manner
which is much less invasive for the core.
Thread (18 messages) 18 messages, 6 authors, last reply 2010-10-06
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help