]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 1 May 2021 17:01:10 +0000 (18:01 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 13 Aug 2021 07:46:01 +0000 (09:46 +0200)
commit7b99fd8c272014513e9655065c51bf693163ebdb
tree5c80d57b8fc3217d002437f3c24b95ccdecc079f
parent0d02404c74b4f3af1cb71aa3bb65d859ee815fcf
iio: adc: ti-ads1015: Fix buffer alignment in iio_push_to_buffers_with_timestamp()

BugLink: https://bugs.launchpad.net/bugs/1938199
[ Upstream commit d85d71dd1ab67eaa7351f69fec512d8f09d164e1 ]

To make code more readable, use a structure to express the channel
layout and ensure the timestamp is 8 byte aligned.

Found during an audit of all calls of this function.

Fixes: ecc24e72f437 ("iio: adc: Add TI ADS1015 ADC driver support")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Daniel Baluta <daniel.baluta@nxp.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20210501170121.512209-9-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/iio/adc/ti-ads1015.c