From 0fa310ccabfe9034017e1b6780052d36fbd9f38f Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 10 Apr 2012 14:22:38 +0800 Subject: [PATCH] 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-format-patch failed