]>
git.ipfire.org Git - thirdparty/linux.git/commit
iio: adc: hx711: move scale computation to per-device storage
The gain-to-scale table is global today, so probe-time scale updates for
one device overwrite the values used by any earlier device instance.
Fix this by making the gain table const and storing the computed scale
values per device in hx711_data.
No functional change for single-sensor configurations.
Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>