lkml.org 
[lkml]   [2012]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/6] Add the main bulk of core driver for SI476x code
On Fri, Oct 05, 2012 at 06:54:58PM -0700, Andrey Smirnov wrote:

> + err = regulator_enable(core->supplies.va);
> + if (err < 0)
> + break;
> +
> + err = regulator_enable(core->supplies.vio2);
> + if (err < 0)
> + goto disable_va;
> +
> + err = regulator_enable(core->supplies.vd);
> + if (err < 0)
> + goto disable_vio2;
> +
> + err = regulator_enable(core->supplies.vio1);
> + if (err < 0)
> + goto disable_vd;

If the sequencing is critical here you should have comments explaining
what the requirement is, otherwise this looks like a prime candidate
for conversion to regulator_bulk_enable() (and similarly for all the
other regulator usage, it appears that all the regulators are worked
with in a bulk fashion).


\
 
 \ /
  Last update: 2012-10-09 09:21    [W:0.105 / U:0.700 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site