Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 612a462a authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Christoph Hellwig
Browse files

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: default avatarBhumika Goyal <bhumirks@gmail.com>
Acked-by: default avatarJonathan Cameron <Jonathan.Cameron@Huawei.com>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 97363902
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -26,7 +26,7 @@
#include <linux/iio/sw_device.h>
#include "iio_simple_dummy.h"

static struct config_item_type iio_dummy_type = {
static const struct config_item_type iio_dummy_type = {
	.ct_owner = THIS_MODULE,
};

+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@
#include <linux/iio/iio.h>
#include <linux/iio/configfs.h>

static struct config_item_type iio_root_group_type = {
static const struct config_item_type iio_root_group_type = {
	.ct_owner       = THIS_MODULE,
};

+3 −3
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@
#include <linux/configfs.h>

static struct config_group *iio_devices_group;
static struct config_item_type iio_device_type_group_type;
static const struct config_item_type iio_device_type_group_type;

static struct config_item_type iio_devices_group_type = {
static const struct config_item_type iio_devices_group_type = {
	.ct_owner = THIS_MODULE,
};

@@ -156,7 +156,7 @@ static struct configfs_group_operations device_ops = {
	.drop_item	= &device_drop_group,
};

static struct config_item_type iio_device_type_group_type = {
static const struct config_item_type iio_device_type_group_type = {
	.ct_group_ops = &device_ops,
	.ct_owner       = THIS_MODULE,
};
+3 −3
Original line number Diff line number Diff line
@@ -19,9 +19,9 @@
#include <linux/configfs.h>

static struct config_group *iio_triggers_group;
static struct config_item_type iio_trigger_type_group_type;
static const struct config_item_type iio_trigger_type_group_type;

static struct config_item_type iio_triggers_group_type = {
static const struct config_item_type iio_triggers_group_type = {
	.ct_owner = THIS_MODULE,
};

@@ -156,7 +156,7 @@ static struct configfs_group_operations trigger_ops = {
	.drop_item	= &trigger_drop_group,
};

static struct config_item_type iio_trigger_type_group_type = {
static const struct config_item_type iio_trigger_type_group_type = {
	.ct_group_ops = &trigger_ops,
	.ct_owner       = THIS_MODULE,
};
+1 −1
Original line number Diff line number Diff line
@@ -30,7 +30,7 @@ struct iio_hrtimer_info {
	ktime_t period;
};

static struct config_item_type iio_hrtimer_type = {
static const struct config_item_type iio_hrtimer_type = {
	.ct_owner = THIS_MODULE,
};

Loading