From: Axel Lin Date: Fri, 13 Apr 2012 01:30:05 +0000 (+0800) Subject: regulator: s5m8767: Use DIV_ROUND_UP to calculate selector X-Git-Tag: v3.5-rc1~177^2~57^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=94e85a3c5d702a4ce96b7a9b883c949a08ebd93c;p=pandora-kernel.git regulator: s5m8767: Use DIV_ROUND_UP to calculate selector Integer division may truncate the result. Use DIV_ROUND_UP to ensure new voltage setting falls within specified range. Also properly handle the case min_vol < desc->min to ensure we don't return negative value for selector. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed