From: Axel Lin Date: Wed, 4 Jul 2012 03:55:07 +0000 (+0800) Subject: regulator: ad5398: Fix min/max current limit boundary checking X-Git-Tag: v3.6-rc1~157^2^2~35 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c6a74c5e0ca3bfac09cb1e7bf7629cc0f3aa48c;p=pandora-kernel.git regulator: ad5398: Fix min/max current limit boundary checking It is ok to request current limit with min_uA < chip->min_uA and max_uA > chip->max_uA. We need to set min_uA = chip->min_uA if (min_uA < chip->min_uA), this ensures the equation to calcuate selator does not return negative number. Also set max_uA = chip->max_uA if (max_uA > chip->max_uA), as suggested by Sonic. Signed-off-by: Axel Lin Acked-by: Sonic Zhang Signed-off-by: Mark Brown --- Reading git-diff-tree failed