lkml.org 
[lkml]   [2011]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Patch 5/11] Regulator: DA9052 regulator support v2
On Wed, Jun 29, 2011 at 06:46:03PM +0530, ashishj3 wrote:

> +static int verify_range(struct da9052_regulator_info *info,
> + int min_uV, int max_uV)
> +{
> + if (min_uV < info->min_uV || min_uV > info->max_uV)
> + return -EINVAL;
> + if (max_uV < info->min_uV || max_uV > info->max_uV)
> + return -EINVAL;

This is broken, think about what it's trying to do - it's trying to
check that the regulator can deliver a voltage within the requested
range. These checks don't help with that.


\
 
 \ /
  Last update: 2011-07-05 18:31    [from the cache]
©2003-2011 Jasper Spaans