Skip to content

Commit 83ded7c

Browse files
lixuzhajic23
authored andcommitted
iio: hid-sensor-prox: Restore lost scale assignments
The variables `scale_pre_decml`, `scale_post_decml`, and `scale_precision` were assigned in commit d68c592 ("iio: hid-sensor-prox: Fix scale not correct issue"), but due to a merge conflict in commit 9c15db9 ("Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next"), these assignments were lost. Add back lost assignments and replace `st->prox_attr` with `st->prox_attr[0]` because commit 596ef5c ("iio: hid-sensor-prox: Add support for more channels") changed `prox_attr` to an array. Cc: stable@vger.kernel.org # 5.13+ Fixes: 9c15db9 ("Merge tag 'iio-for-5.13a' of https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio into staging-next") Signed-off-by: Zhang Lixu <lixu.zhang@intel.com> Acked-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Link: https://patch.msgid.link/20250331055022.1149736-2-lixu.zhang@intel.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 5257d80 commit 83ded7c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/iio/light/hid-sensor-prox.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,11 @@ static int prox_parse_report(struct platform_device *pdev,
257257

258258
st->num_channels = index;
259259

260+
st->scale_precision = hid_sensor_format_scale(hsdev->usage,
261+
&st->prox_attr[0],
262+
&st->scale_pre_decml,
263+
&st->scale_post_decml);
264+
260265
return 0;
261266
}
262267

0 commit comments

Comments
 (0)