Re: [PATCH 2/3] regulator: threat regulators with constant volatageas fixed
From: Mark Brown
Date: Tue Nov 13 2012 - 04:00:13 EST
On Tue, Nov 13, 2012 at 09:48:52AM +0100, Marek Szyprowski wrote:
> Some drivers has additional logic for fixed regulators. Let regulator core
> to threat regulators which cannot change their voltage due to applied
YM "treat".
> + if (rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)
> + return rdev->desc->n_voltages ? : -EINVAL;
Please don't perpetuate the use of ? : as it's not a triumph of
legibility (even worse than the regular ternery operator). I realise
that the original code did this but there's no need to carry on doing
the same thing.
Attachment:
signature.asc
Description: Digital signature