public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: broonie@opensource•wolfsonmicro.com (Mark Brown)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v2] Input: Make ADS7846 independent on regulator
Date: Tue, 5 Oct 2010 15:52:24 -0700	[thread overview]
Message-ID: <20101005225223.GC23315@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <AANLkTimTW6v3N9aRA0h15SWXbBc_W0dhpf5rEeqBqGbf@mail.gmail.com>

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.

  reply	other threads:[~2010-10-05 22:52 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-31  7:09 [PATCH v2] Input: Make ADS7846 independent on regulator Marek Vasut
2010-09-07 12:23 ` Igor Grinberg
2010-09-07 12:53   ` Mark Brown
2010-09-09  8:27     ` Marek Vasut
2010-09-09  9:41       ` Mark Brown
2010-10-01  0:20         ` Marek Vasut
2010-10-05  6:49         ` Igor Grinberg
2010-10-05  8:21           ` Marek Vasut
2010-10-05 16:16           ` Dmitry Torokhov
2010-10-05 16:40             ` Mark Brown
2010-10-05 18:07               ` Dmitry Torokhov
2010-10-05 18:59                 ` Mark Brown
2010-10-05 19:35                   ` Alan Cox
2010-10-05 20:42                     ` Mark Brown
2010-10-05 22:09                     ` Linus Walleij
2010-10-05 22:52                       ` Mark Brown [this message]
2010-10-06  8:01                         ` Linus Walleij
2010-10-06 15:14                           ` Mark Brown

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=20101005225223.GC23315@opensource.wolfsonmicro.com \
    --to=broonie@opensource$(echo .)wolfsonmicro.com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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