aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-10-16 11:18:54 -0400
committerChristoph Hellwig <hch@lst.de>2017-10-19 10:15:15 -0400
commit84c43674f4c0625971cbb03fbe339ec2723ef10e (patch)
treeb3bd4e62c9fd4682075e537535d35272a4c2841e
parent3f6928c347707a65cee10a9f54b85ad5fb078b3f (diff)
configfs: make config_item_type const
Make config_item_type structures const as they are either passed to a function having the argument as const or stored in the const "ci_type" field of a config_item structure. Done using Coccinelle. Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--samples/configfs/configfs_sample.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/samples/configfs/configfs_sample.c b/samples/configfs/configfs_sample.c
index 1ea33119e532..004a4e201476 100644
--- a/samples/configfs/configfs_sample.c
+++ b/samples/configfs/configfs_sample.c
@@ -115,7 +115,7 @@ static struct configfs_attribute *childless_attrs[] = {
115 NULL, 115 NULL,
116}; 116};
117 117
118static struct config_item_type childless_type = { 118static const struct config_item_type childless_type = {
119 .ct_attrs = childless_attrs, 119 .ct_attrs = childless_attrs,
120 .ct_owner = THIS_MODULE, 120 .ct_owner = THIS_MODULE,
121}; 121};
@@ -193,7 +193,7 @@ static struct configfs_item_operations simple_child_item_ops = {
193 .release = simple_child_release, 193 .release = simple_child_release,
194}; 194};
195 195
196static struct config_item_type simple_child_type = { 196static const struct config_item_type simple_child_type = {
197 .ct_item_ops = &simple_child_item_ops, 197 .ct_item_ops = &simple_child_item_ops,
198 .ct_attrs = simple_child_attrs, 198 .ct_attrs = simple_child_attrs,
199 .ct_owner = THIS_MODULE, 199 .ct_owner = THIS_MODULE,
@@ -261,7 +261,7 @@ static struct configfs_group_operations simple_children_group_ops = {
261 .make_item = simple_children_make_item, 261 .make_item = simple_children_make_item,
262}; 262};
263 263
264static struct config_item_type simple_children_type = { 264static const struct config_item_type simple_children_type = {
265 .ct_item_ops = &simple_children_item_ops, 265 .ct_item_ops = &simple_children_item_ops,
266 .ct_group_ops = &simple_children_group_ops, 266 .ct_group_ops = &simple_children_group_ops,
267 .ct_attrs = simple_children_attrs, 267 .ct_attrs = simple_children_attrs,
@@ -331,7 +331,7 @@ static struct configfs_group_operations group_children_group_ops = {
331 .make_group = group_children_make_group, 331 .make_group = group_children_make_group,
332}; 332};
333 333
334static struct config_item_type group_children_type = { 334static const struct config_item_type group_children_type = {
335 .ct_group_ops = &group_children_group_ops, 335 .ct_group_ops = &group_children_group_ops,
336 .ct_attrs = group_children_attrs, 336 .ct_attrs = group_children_attrs,
337 .ct_owner = THIS_MODULE, 337 .ct_owner = THIS_MODULE,