]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvmem: core: update raw_len if the bit reading is required
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Fri, 11 Apr 2025 11:22:48 +0000 (12:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 12:41:21 +0000 (14:41 +0200)
commit6786484223d5705bf7f919c1e5055d478ebeec32
treed7aec2ab987c3f4438a2d150779e8ea168f5fb8e
parent13bcd440f2ff38cd7e42a179c223d4b833158b33
nvmem: core: update raw_len if the bit reading is required

If NVMEM cell uses bit offset or specifies bit truncation, update
raw_len manually (following the cell->bytes update), ensuring that the
NVMEM access is still word-aligned.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20250411112251.68002-11-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c