summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2016-10-01 15:27:18 +0530
committerJonathan Cameron <jic23@kernel.org>2016-10-01 14:37:35 +0100
commita9a0d64a8b7af406f03b660cbad948cfd34ed2b0 (patch)
tree331715ba7f561bd9a9cbd70d79ad2bc927714c85 /include/linux/iio
parent1cb357695849542b71ad8f76b2c2cba308b27e24 (diff)
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 <bhumirks@gmail.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/iio.h2
1 files changed, 1 insertions, 1 deletions
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,