From: Bhumika Goyal Date: Sat, 1 Oct 2016 09:57:18 +0000 (+0530) Subject: iio: Declare event_attrs field of iio_info structure as const X-Git-Tag: v4.10-rc1~148^2~508^2~93 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=a9a0d64a8b7af406f03b660cbad948cfd34ed2b0;p=linux.git iio: Declare event_attrs field of iio_info structure as const The event_attrs field of iio_info structure is only initialized once whenever an object of iio_info is created. After that this field is never modified again anywhere in the kernel. So, declare event_attrs field of iio_info as a const struct attribute_group. Checked for occurences throughout the kernel using grep and coccinelle. Signed-off-by: Bhumika Goyal Signed-off-by: Jonathan Cameron --- diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h index b4a0679e4a49..4591d8ea41bd 100644 --- a/include/linux/iio/iio.h +++ b/include/linux/iio/iio.h @@ -381,7 +381,7 @@ struct iio_dev; **/ struct iio_info { struct module *driver_module; - struct attribute_group *event_attrs; + const struct attribute_group *event_attrs; const struct attribute_group *attrs; int (*read_raw)(struct iio_dev *indio_dev,