The loop for skipping external ranges should start at the first
valid range. It was starting at 0 which on cs47l15 had the effect
of changing hpdet_init_range to 0.
Change-Id: If4783b66b661dceca28aaa5617f6494af7898c5f
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
}
/* Skip any HPDET ranges less than the external resistance */
- for (i = 0; i < info->num_hpdet_ranges; ++i) {
+ for (i = info->hpdet_init_range; i < info->num_hpdet_ranges; ++i) {
if (madera_ohm_to_hohm(info->hpdet_ranges[i].max) >=
pdata->hpdet_ext_res_x100) {
info->hpdet_init_range = i;