Lines Matching refs:all_gains
171 int *all_gains; in gain_to_scaletables() local
193 all_gains = kcalloc(gts->num_itime, gain_bytes, GFP_KERNEL); in gain_to_scaletables()
194 if (!all_gains) in gain_to_scaletables()
205 memcpy(all_gains, gains[time_idx], gain_bytes); in gain_to_scaletables()
213 if (candidate > all_gains[new_idx - 1]) { in gain_to_scaletables()
214 all_gains[new_idx] = candidate; in gain_to_scaletables()
220 if (candidate <= all_gains[chk]) in gain_to_scaletables()
223 if (candidate == all_gains[chk]) in gain_to_scaletables()
226 memmove(&all_gains[chk + 1], &all_gains[chk], in gain_to_scaletables()
228 all_gains[chk] = candidate; in gain_to_scaletables()
242 ret = iio_gts_total_gain_to_scale(gts, all_gains[i], in gain_to_scaletables()
254 kfree(all_gains); in gain_to_scaletables()