Commit 681ab2ce authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Jonathan Cameron

iio: accel: mma8452: Constify static struct attribute_group

The only usage of mma8452_event_attribute_group is to assign its address
to the event_attrs field in the iio_info struct, which is a const
pointer. Make it const to allow the compiler to put it in read-only
memory. This was the only non-const static struct in drivers/iio.
Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20200930232939.31131-1-rikard.falkeborn@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 223f4d95
......@@ -1187,7 +1187,7 @@ static struct attribute *mma8452_event_attributes[] = {
NULL,
};
static struct attribute_group mma8452_event_attribute_group = {
static const struct attribute_group mma8452_event_attribute_group = {
.attrs = mma8452_event_attributes,
};
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment