From: Axel Lin Date: Tue, 10 Apr 2012 06:22:38 +0000 (+0800) Subject: regulator: max8997: Remove n_bits from struct voltage_map_desc X-Git-Tag: v3.5-rc1~177^2~58^3~43 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fa310ccabfe9034017e1b6780052d36fbd9f38f;p=pandora-kernel.git regulator: max8997: Remove n_bits from struct voltage_map_desc The n_bits is only used in max8997_get_voltage_proper_val to check the valid range for variable i. Current code already ensures min_vol never greater than desc->max, which means the variable i always in the valid range: 0 .. (desc->max - desc->min)/desc->step. Thus we can remove the checking (i >= (1 << desc->n_bits) and then remove n_bits from struct voltage_map_desc. Signed-off-by: Axel Lin Signed-off-by: Mark Brown --- Reading git-diff-tree failed