diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-10-16 11:18:46 -0400 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2017-10-19 10:15:27 -0400 |
commit | 4ad0141226f00eee3cfe4392c27e14bf15520640 (patch) | |
tree | d86079db60a94c8febc563713503f3c26de47e33 | |
parent | 5c4e2476ed54de92e0289cb7d4b08d939f5ae730 (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.c | 10 |
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 | ||
508 | static struct config_item_type gadget_config_type = { | 508 | static 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 | ||
514 | static struct config_item_type gadget_root_type = { | 514 | static 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 | ||
596 | static struct config_item_type functions_type = { | 596 | static 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 | ||
697 | static struct config_item_type config_desc_type = { | 697 | static 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 | ||
1479 | static struct config_item_type gadgets_type = { | 1479 | static 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 | }; |