Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: chemical: atlas: Fix buffer alignment in iio_push_to_buffers_with_timestamp()

Variable location for the timestamp, so just use __aligned(8)
to ensure it is always possible to naturally align it.

Found during an audit of all calls of uses of
iio_push_to_buffers_with_timestamp()

Fixes tag is not accurate, but it will need manual backporting beyond
that point if anyone cares.

Fixes: 0d15190f53b4 ("iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensor")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Link: https://lore.kernel.org/r/20210501171352.512953-6-jic23@kernel.org

+2 -2
+2 -2
drivers/iio/chemical/atlas-sensor.c
··· 91 91 struct regmap *regmap; 92 92 struct irq_work work; 93 93 unsigned int interrupt_enabled; 94 - 95 - __be32 buffer[6]; /* 96-bit data + 32-bit pad + 64-bit timestamp */ 94 + /* 96-bit data + 32-bit pad + 64-bit timestamp */ 95 + __be32 buffer[6] __aligned(8); 96 96 }; 97 97 98 98 static const struct regmap_config atlas_regmap_config = {