summaryrefslogtreecommitdiff
path: root/lib/atomic64_test.c
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2021-01-10 00:11:46 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-01-22 08:52:06 +0000
commit7ae7f75080733d1d0e7c32156725c5729b02404d (patch)
tree6a5e26a89f1aa83d8feecf6f784a680a70a5d4c8 /lib/atomic64_test.c
parent07498719bedecc8be1ecc62ea50315e91a668cac (diff)
iio:common:ms_sensors:ms_sensors_i2c: rework CRC calculation helper
The CRC calculation always happens on 8 words which is why there is an extra element in the prom array of struct ms_tp_dev. However, on ms5637 and similar, only 7 words are readable. Then, set MS_SENSORS_TP_PROM_WORDS_NB to 8 and stop passing a len parameter to ms_sensors_tp_crc_valid as this simply hide the fact that it is hardcoded. Finally, use the newly introduced hw->prom_len to know how many words can be read. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Link: https://lore.kernel.org/r/20210109231148.1168104-5-alexandre.belloni@bootlin.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'lib/atomic64_test.c')
0 files changed, 0 insertions, 0 deletions