[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20141229154030.GJ17800@sirena.org.uk>
Date: Mon, 29 Dec 2014 15:40:30 +0000
From: Mark Brown <broonie@...nel.org>
To: Gregory CLEMENT <gregory.clement@...e-electrons.com>
Cc: Liam Girdwood <lgirdwood@...il.com>, linux-kernel@...r.kernel.org,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
Ezequiel Garcia <ezequiel.garcia@...e-electrons.com>,
Maxime Ripard <maxime.ripard@...e-electrons.com>,
Boris BREZILLON <boris.brezillon@...e-electrons.com>,
Lior Amsalem <alior@...vell.com>,
Tawfik Bayouk <tawfik@...vell.com>,
Nadav Haklai <nadavh@...vell.com>, linux-ide@...r.kernel.org
Subject: Re: [PATCH 1/2] regulator: core: Add a sanity check on the
regulator_ enable/disable functions
On Fri, Dec 26, 2014 at 06:26:38PM +0100, Gregory CLEMENT wrote:
> These two functions use the pointer passed in parameter without any
> check. By adding a NULL pointer check, it allows using those functions
> from a driver in a more generic way. It is useful especially for the
> disable case if the regulator is optional.
No, especially in the case of regulator_enable() this is deliberate -
we're trying to ensure that if people are using regulators they're being
careful about it, checking error codes and so on. I'd really want to
see some persuasive use case for this. What you're saying here sounds
like the consumer shouldn't be treating the regulator as optional at
all but should instead be using a normal regulator.
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists