regulator: core: Slightly improve readability of _regulator_get_enable_time
The logic is equivalent, but it looks more straightforward this way: If rdev->desc->ops->enable_time is set, call it. Otherwise fallback to return rdev->desc->enable_time. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
e2a23affe6
commit
68ce3a4461
|
@ -1650,9 +1650,9 @@ static int _regulator_get_enable_time(struct regulator_dev *rdev)
|
|||
{
|
||||
if (rdev->constraints && rdev->constraints->enable_time)
|
||||
return rdev->constraints->enable_time;
|
||||
if (!rdev->desc->ops->enable_time)
|
||||
return rdev->desc->enable_time;
|
||||
return rdev->desc->ops->enable_time(rdev);
|
||||
if (rdev->desc->ops->enable_time)
|
||||
return rdev->desc->ops->enable_time(rdev);
|
||||
return rdev->desc->enable_time;
|
||||
}
|
||||
|
||||
static struct regulator_supply_alias *regulator_find_supply_alias(
|
||||
|
|
Loading…
Reference in New Issue