]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
iio: accel: mma9553: make mma9553_event_info const
authorDavid Lechner <dlechner@baylibre.com>
Sat, 28 Jun 2025 16:00:07 +0000 (11:00 -0500)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 6 Jul 2025 09:37:51 +0000 (10:37 +0100)
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>
drivers/iio/accel/mma9553.c

index ffb0d6ff37124e5f364168c5c4f348a02d28842a..f85384a7908f253f9ed55dae4e0a41a39ae6016b 100644 (file)
@@ -97,7 +97,7 @@ enum activity_level {
        ACTIVITY_RUNNING,
 };
 
-static struct mma9553_event_info {
+static const struct mma9553_event_info {
        enum iio_chan_type type;
        enum iio_modifier mod;
        enum iio_event_direction dir;
@@ -152,7 +152,7 @@ static struct mma9553_event_info {
 #define MMA9553_EVENTS_INFO_SIZE ARRAY_SIZE(mma9553_events_info)
 
 struct mma9553_event {
-       struct mma9553_event_info *info;
+       const struct mma9553_event_info *info;
        bool enabled;
 };