summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-10-16 17:18:43 +0200
committerChristoph Hellwig <hch@lst.de>2017-10-19 16:15:24 +0200
commit612a462acbb9f3bfc7c8433b44118b0a156560da (patch)
tree5dfe869425cc226f7f1d8c0cea04b609b61edffa /include
parent973639023444320d4fb5c17af58996463b3392d9 (diff)
downloadlinux-612a462acbb9f3bfc7c8433b44118b0a156560da.tar.gz
linux-612a462acbb9f3bfc7c8433b44118b0a156560da.tar.bz2
linux-612a462acbb9f3bfc7c8433b44118b0a156560da.zip
iio: make function argument and some structures const
Make the argument of the functions iio_sw{d/t}_group_init_type_name const as they are only passed to the function config_group_init_type_name having the argument as const. Make the config_item_type structures const as they are either passed to the functions having the argument as const or they are stored in the const "ci_type" field of a config_item structure. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Acked-by: Jonathan Cameron <Jonathan.Cameron@Huawei.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/iio/sw_device.h2
-rw-r--r--include/linux/iio/sw_trigger.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/iio/sw_device.h b/include/linux/iio/sw_device.h
index fa7931933067..8642b91a7577 100644
--- a/include/linux/iio/sw_device.h
+++ b/include/linux/iio/sw_device.h
@@ -60,7 +60,7 @@ void iio_sw_device_type_configfs_unregister(struct iio_sw_device_type *dt);
static inline
void iio_swd_group_init_type_name(struct iio_sw_device *d,
const char *name,
- struct config_item_type *type)
+ const struct config_item_type *type)
{
#if IS_ENABLED(CONFIG_CONFIGFS_FS)
config_group_init_type_name(&d->group, name, type);
diff --git a/include/linux/iio/sw_trigger.h b/include/linux/iio/sw_trigger.h
index c97eab67558f..0c43738a9e24 100644
--- a/include/linux/iio/sw_trigger.h
+++ b/include/linux/iio/sw_trigger.h
@@ -60,7 +60,7 @@ void iio_sw_trigger_type_configfs_unregister(struct iio_sw_trigger_type *tt);
static inline
void iio_swt_group_init_type_name(struct iio_sw_trigger *t,
const char *name,
- struct config_item_type *type)
+ const struct config_item_type *type)
{
#if IS_ENABLED(CONFIG_CONFIGFS_FS)
config_group_init_type_name(&t->group, name, type);