Skip to content

Commit b866e55

Browse files
dlechjic23
authored andcommitted
iio: accel: adxl345: make adxl345_events const
Add const qualifier to struct iio_event_spec adxl345_events[]. This is read-only data so it can be made const. Signed-off-by: David Lechner <dlechner@baylibre.com> Link: https://patch.msgid.link/20250628-iio-const-data-1-v1-1-a32d96d01c2f@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 14071b9 commit b866e55

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iio/accel/adxl345_core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ struct adxl345_state {
143143
__le16 fifo_buf[ADXL345_DIRS * ADXL345_FIFO_SIZE + 1] __aligned(IIO_DMA_MINALIGN);
144144
};
145145

146-
static struct iio_event_spec adxl345_events[] = {
146+
static const struct iio_event_spec adxl345_events[] = {
147147
{
148148
/* single tap */
149149
.type = IIO_EV_TYPE_GESTURE,

0 commit comments

Comments
 (0)