aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-10-16 11:18:46 -0400
committerChristoph Hellwig <hch@lst.de>2017-10-19 10:15:27 -0400
commit4ad0141226f00eee3cfe4392c27e14bf15520640 (patch)
treed86079db60a94c8febc563713503f3c26de47e33
parent5c4e2476ed54de92e0289cb7d4b08d939f5ae730 (diff)
usb: gadget: 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> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--drivers/usb/gadget/configfs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index aeb9f3c40521..9d18b9917913 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -505,13 +505,13 @@ static struct configfs_attribute *gadget_config_attrs[] = {
505 NULL, 505 NULL,
506}; 506};
507 507
508static struct config_item_type gadget_config_type = { 508static const struct config_item_type gadget_config_type = {
509 .ct_item_ops = &gadget_config_item_ops, 509 .ct_item_ops = &gadget_config_item_ops,
510 .ct_attrs = gadget_config_attrs, 510 .ct_attrs = gadget_config_attrs,
511 .ct_owner = THIS_MODULE, 511 .ct_owner = THIS_MODULE,
512}; 512};
513 513
514static struct config_item_type gadget_root_type = { 514static const struct config_item_type gadget_root_type = {
515 .ct_item_ops = &gadget_root_item_ops, 515 .ct_item_ops = &gadget_root_item_ops,
516 .ct_attrs = gadget_root_attrs, 516 .ct_attrs = gadget_root_attrs,
517 .ct_owner = THIS_MODULE, 517 .ct_owner = THIS_MODULE,
@@ -593,7 +593,7 @@ static struct configfs_group_operations functions_ops = {
593 .drop_item = &function_drop, 593 .drop_item = &function_drop,
594}; 594};
595 595
596static struct config_item_type functions_type = { 596static const struct config_item_type functions_type = {
597 .ct_group_ops = &functions_ops, 597 .ct_group_ops = &functions_ops,
598 .ct_owner = THIS_MODULE, 598 .ct_owner = THIS_MODULE,
599}; 599};
@@ -694,7 +694,7 @@ static struct configfs_group_operations config_desc_ops = {
694 .drop_item = &config_desc_drop, 694 .drop_item = &config_desc_drop,
695}; 695};
696 696
697static struct config_item_type config_desc_type = { 697static const struct config_item_type config_desc_type = {
698 .ct_group_ops = &config_desc_ops, 698 .ct_group_ops = &config_desc_ops,
699 .ct_owner = THIS_MODULE, 699 .ct_owner = THIS_MODULE,
700}; 700};
@@ -1476,7 +1476,7 @@ static struct configfs_group_operations gadgets_ops = {
1476 .drop_item = &gadgets_drop, 1476 .drop_item = &gadgets_drop,
1477}; 1477};
1478 1478
1479static struct config_item_type gadgets_type = { 1479static const struct config_item_type gadgets_type = {
1480 .ct_group_ops = &gadgets_ops, 1480 .ct_group_ops = &gadgets_ops,
1481 .ct_owner = THIS_MODULE, 1481 .ct_owner = THIS_MODULE,
1482}; 1482};