summaryrefslogtreecommitdiff
path: root/rust/zerocopy/src/git@git.tavy.me:linux-stable.git
diff options
context:
space:
mode:
authorVidhu Sarwal <vidhu.linux@gmail.com>2026-07-04 17:22:45 +0530
committerJonathan Cameron <jic23@kernel.org>2026-07-05 00:04:18 +0100
commitaa411adc6ce40ad1a55ebc965f255a4cfc0005f8 (patch)
tree8e0242b1075987384a309150d57c6ab919b53eea /rust/zerocopy/src/git@git.tavy.me:linux-stable.git
parenta9f41809bf1bd8e5c1bc4b6a1052adac58eb7ab6 (diff)
iio: light: al3010: fix incorrect scale for the highest gain range
al3010_scales[] encodes the highest gain range as {0, 1187200}. For IIO_VAL_INT_PLUS_MICRO, the fractional part must be less than 1000000, so the scale 1.1872 should instead be represented as { 1, 187200 }. Since write_raw() compares the value from userspace against this table, writing the advertised 1.1872 scale never matches the malformed entry and returns -EINVAL. As a result, the highest gain range cannot be selected. Reading the scale in that state also reports the malformed value. Fixes: c36b5195ab70 ("iio: light: add Dyna-Image AL3010 driver") Signed-off-by: Vidhu Sarwal <vidhu.linux@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Cc: <Stable@vger.kernel.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'rust/zerocopy/src/git@git.tavy.me:linux-stable.git')
0 files changed, 0 insertions, 0 deletions