diff options
| author | Bhumika Goyal <bhumirks@gmail.com> | 2016-10-01 05:57:18 -0400 |
|---|---|---|
| committer | Jonathan Cameron <jic23@kernel.org> | 2016-10-01 09:37:35 -0400 |
| commit | a9a0d64a8b7af406f03b660cbad948cfd34ed2b0 (patch) | |
| tree | 331715ba7f561bd9a9cbd70d79ad2bc927714c85 /include/linux | |
| parent | 1cb357695849542b71ad8f76b2c2cba308b27e24 (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')
| -rw-r--r-- | include/linux/iio/iio.h | 2 |
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; | |||
| 381 | **/ | 381 | **/ |
| 382 | struct iio_info { | 382 | struct iio_info { |
| 383 | struct module *driver_module; | 383 | struct module *driver_module; |
| 384 | struct attribute_group *event_attrs; | 384 | const struct attribute_group *event_attrs; |
| 385 | const struct attribute_group *attrs; | 385 | const struct attribute_group *attrs; |
| 386 | 386 | ||
| 387 | int (*read_raw)(struct iio_dev *indio_dev, | 387 | int (*read_raw)(struct iio_dev *indio_dev, |
