Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 500b4ac9 authored by Sundar R Iyer's avatar Sundar R Iyer Committed by Liam Girdwood
Browse files

regulator: return set_mode is same mode is requested



On Mon, 2010-05-17 at 17:34 +0200, Mark Brown wrote:
> This doesn't seem like the right error handling - if the driver has a
> set_mode() you'd *expect* it to have a get_mode() but there's no need
> for it to be a strict requirement.
True. In such a case, even a valid request would be lost! So now
in the updated patch:
 - check if get_mode is present to avoid oops;
 - if get_mode is not present, proceed anyways for the request.

Here is the updated patch:

>From bad0d5eb51ef84be5b100e3dd0f5a590ea0529b6 Mon Sep 17 00:00:00 2001
From: Sundar R Iyer <sundar.iyer@stericsson.com>
Date: Fri, 14 May 2010 15:14:17 +0530
Subject: [PATCH 1/1] regulator: return set_mode when same mode is requested

save I/O costs by returning when the same mode is
requested for the regulator

Cc: Liam Girdwood <lrg@slimlogic.co.uk>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: default avatarLinus Walleij <linus.walleij@stericsson.com>
Signed-off-by: default avatarSundar R Iyer <sundar.iyer@stericsson.com>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarLiam Girdwood <lrg@slimlogic.co.uk>
parent 64714354
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment