Skip to content

Commit 4a92287

Browse files
dlechjic23
authored andcommitted
iio: accel: mma9553: make mma9553_event_info const
Add const qualifier to struct mma9553_event_info mma9553_event_info[]. 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-2-v1-1-a61da3a0941e@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent b866e55 commit 4a92287

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/iio/accel/mma9553.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ enum activity_level {
9797
ACTIVITY_RUNNING,
9898
};
9999

100-
static struct mma9553_event_info {
100+
static const struct mma9553_event_info {
101101
enum iio_chan_type type;
102102
enum iio_modifier mod;
103103
enum iio_event_direction dir;
@@ -152,7 +152,7 @@ static struct mma9553_event_info {
152152
#define MMA9553_EVENTS_INFO_SIZE ARRAY_SIZE(mma9553_events_info)
153153

154154
struct mma9553_event {
155-
struct mma9553_event_info *info;
155+
const struct mma9553_event_info *info;
156156
bool enabled;
157157
};
158158

0 commit comments

Comments
 (0)