Re: [PATCH] regulator: Only notify voltage changes when theysucceed

From: Liam Girdwood
Date: Fri Dec 17 2010 - 05:42:47 EST


On Thu, 2010-12-16 at 13:59 +0000, Mark Brown wrote:
> Currently we notify a voltage change whenever we exit set_voltage(),
> even if the change failed for some reason (eg, a constraints issue).
> This shouldn't cause any substantial ill effects but is wasteful as
> listeners get notified on noops. Fix this by moving the notification
> into _do_set_voltage() and only notifying if we don't return an error.
>
> Reported-by: Saravana Kannan <skannan@xxxxxxxxxxxxxx>
> Signed-off-by: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
> ---
> drivers/regulator/core.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
Applied.

Thanks

Liam
--
Freelance Developer, SlimLogic Ltd
ASoC and Voltage Regulator Maintainer.
http://www.slimlogic.co.uk

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/