aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/acpi/acpi_configfs.c6
-rw-r--r--drivers/block/null_blk.c4
-rw-r--r--drivers/hwtracing/stm/policy.c10
-rw-r--r--drivers/iio/dummy/iio_simple_dummy.c2
-rw-r--r--drivers/iio/industrialio-configfs.c2
-rw-r--r--drivers/iio/industrialio-sw-device.c6
-rw-r--r--drivers/iio/industrialio-sw-trigger.c6
-rw-r--r--drivers/iio/trigger/iio-trig-hrtimer.c2
-rw-r--r--drivers/iio/trigger/iio-trig-loop.c2
-rw-r--r--drivers/infiniband/core/cma_configfs.c8
-rw-r--r--drivers/net/netconsole.c4
-rw-r--r--drivers/nvme/target/configfs.c30
-rw-r--r--drivers/pci/endpoint/pci-ep-cfs.c12
-rw-r--r--drivers/target/iscsi/iscsi_target_stat.c12
-rw-r--r--drivers/target/target_core_configfs.c14
-rw-r--r--drivers/target/target_core_stat.c16
-rw-r--r--drivers/usb/gadget/configfs.c10
-rw-r--r--drivers/usb/gadget/function/f_acm.c2
-rw-r--r--drivers/usb/gadget/function/f_ecm.c2
-rw-r--r--drivers/usb/gadget/function/f_eem.c2
-rw-r--r--drivers/usb/gadget/function/f_fs.c2
-rw-r--r--drivers/usb/gadget/function/f_hid.c2
-rw-r--r--drivers/usb/gadget/function/f_loopback.c2
-rw-r--r--drivers/usb/gadget/function/f_mass_storage.c4
-rw-r--r--drivers/usb/gadget/function/f_midi.c2
-rw-r--r--drivers/usb/gadget/function/f_ncm.c2
-rw-r--r--drivers/usb/gadget/function/f_obex.c2
-rw-r--r--drivers/usb/gadget/function/f_phonet.c2
-rw-r--r--drivers/usb/gadget/function/f_printer.c2
-rw-r--r--drivers/usb/gadget/function/f_rndis.c2
-rw-r--r--drivers/usb/gadget/function/f_serial.c2
-rw-r--r--drivers/usb/gadget/function/f_sourcesink.c2
-rw-r--r--drivers/usb/gadget/function/f_subset.c2
-rw-r--r--drivers/usb/gadget/function/f_tcm.c2
-rw-r--r--drivers/usb/gadget/function/f_uac1.c2
-rw-r--r--drivers/usb/gadget/function/f_uac1_legacy.c2
-rw-r--r--drivers/usb/gadget/function/f_uac2.c2
-rw-r--r--drivers/usb/gadget/function/uvc_configfs.c50
-rw-r--r--fs/configfs/dir.c10
-rw-r--r--fs/configfs/file.c12
-rw-r--r--fs/configfs/item.c6
-rw-r--r--fs/configfs/symlink.c4
-rw-r--r--fs/dlm/config.c16
-rw-r--r--fs/ocfs2/cluster/heartbeat.c4
-rw-r--r--fs/ocfs2/cluster/nodemanager.c8
-rw-r--r--include/linux/configfs.h8
-rw-r--r--include/linux/iio/sw_device.h2
-rw-r--r--include/linux/iio/sw_trigger.h2
-rw-r--r--include/target/iscsi/iscsi_target_stat.h12
-rw-r--r--samples/configfs/configfs_sample.c8
50 files changed, 165 insertions, 165 deletions
diff --git a/drivers/acpi/acpi_configfs.c b/drivers/acpi/acpi_configfs.c
index 853bc7fc673f..b58850389094 100644
--- a/drivers/acpi/acpi_configfs.c
+++ b/drivers/acpi/acpi_configfs.c
@@ -204,7 +204,7 @@ struct configfs_attribute *acpi_table_attrs[] = {
204 NULL, 204 NULL,
205}; 205};
206 206
207static struct config_item_type acpi_table_type = { 207static const struct config_item_type acpi_table_type = {
208 .ct_owner = THIS_MODULE, 208 .ct_owner = THIS_MODULE,
209 .ct_bin_attrs = acpi_table_bin_attrs, 209 .ct_bin_attrs = acpi_table_bin_attrs,
210 .ct_attrs = acpi_table_attrs, 210 .ct_attrs = acpi_table_attrs,
@@ -237,12 +237,12 @@ struct configfs_group_operations acpi_table_group_ops = {
237 .drop_item = acpi_table_drop_item, 237 .drop_item = acpi_table_drop_item,
238}; 238};
239 239
240static struct config_item_type acpi_tables_type = { 240static const struct config_item_type acpi_tables_type = {
241 .ct_owner = THIS_MODULE, 241 .ct_owner = THIS_MODULE,
242 .ct_group_ops = &acpi_table_group_ops, 242 .ct_group_ops = &acpi_table_group_ops,
243}; 243};
244 244
245static struct config_item_type acpi_root_group_type = { 245static const struct config_item_type acpi_root_group_type = {
246 .ct_owner = THIS_MODULE, 246 .ct_owner = THIS_MODULE,
247}; 247};
248 248
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 8042c26ea9e6..cda69dbefe3b 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -476,7 +476,7 @@ static struct configfs_item_operations nullb_device_ops = {
476 .release = nullb_device_release, 476 .release = nullb_device_release,
477}; 477};
478 478
479static struct config_item_type nullb_device_type = { 479static const struct config_item_type nullb_device_type = {
480 .ct_item_ops = &nullb_device_ops, 480 .ct_item_ops = &nullb_device_ops,
481 .ct_attrs = nullb_device_attrs, 481 .ct_attrs = nullb_device_attrs,
482 .ct_owner = THIS_MODULE, 482 .ct_owner = THIS_MODULE,
@@ -528,7 +528,7 @@ static struct configfs_group_operations nullb_group_ops = {
528 .drop_item = nullb_group_drop_item, 528 .drop_item = nullb_group_drop_item,
529}; 529};
530 530
531static struct config_item_type nullb_group_type = { 531static const struct config_item_type nullb_group_type = {
532 .ct_group_ops = &nullb_group_ops, 532 .ct_group_ops = &nullb_group_ops,
533 .ct_attrs = nullb_group_attrs, 533 .ct_attrs = nullb_group_attrs,
534 .ct_owner = THIS_MODULE, 534 .ct_owner = THIS_MODULE,
diff --git a/drivers/hwtracing/stm/policy.c b/drivers/hwtracing/stm/policy.c
index 6c0ae2996326..33e9a1b6ea7c 100644
--- a/drivers/hwtracing/stm/policy.c
+++ b/drivers/hwtracing/stm/policy.c
@@ -187,8 +187,8 @@ static struct configfs_attribute *stp_policy_node_attrs[] = {
187 NULL, 187 NULL,
188}; 188};
189 189
190static struct config_item_type stp_policy_type; 190static const struct config_item_type stp_policy_type;
191static struct config_item_type stp_policy_node_type; 191static const struct config_item_type stp_policy_node_type;
192 192
193static struct config_group * 193static struct config_group *
194stp_policy_node_make(struct config_group *group, const char *name) 194stp_policy_node_make(struct config_group *group, const char *name)
@@ -236,7 +236,7 @@ static struct configfs_group_operations stp_policy_node_group_ops = {
236 .drop_item = stp_policy_node_drop, 236 .drop_item = stp_policy_node_drop,
237}; 237};
238 238
239static struct config_item_type stp_policy_node_type = { 239static const struct config_item_type stp_policy_node_type = {
240 .ct_item_ops = &stp_policy_node_item_ops, 240 .ct_item_ops = &stp_policy_node_item_ops,
241 .ct_group_ops = &stp_policy_node_group_ops, 241 .ct_group_ops = &stp_policy_node_group_ops,
242 .ct_attrs = stp_policy_node_attrs, 242 .ct_attrs = stp_policy_node_attrs,
@@ -311,7 +311,7 @@ static struct configfs_group_operations stp_policy_group_ops = {
311 .make_group = stp_policy_node_make, 311 .make_group = stp_policy_node_make,
312}; 312};
313 313
314static struct config_item_type stp_policy_type = { 314static const struct config_item_type stp_policy_type = {
315 .ct_item_ops = &stp_policy_item_ops, 315 .ct_item_ops = &stp_policy_item_ops,
316 .ct_group_ops = &stp_policy_group_ops, 316 .ct_group_ops = &stp_policy_group_ops,
317 .ct_attrs = stp_policy_attrs, 317 .ct_attrs = stp_policy_attrs,
@@ -380,7 +380,7 @@ static struct configfs_group_operations stp_policies_group_ops = {
380 .make_group = stp_policies_make, 380 .make_group = stp_policies_make,
381}; 381};
382 382
383static struct config_item_type stp_policies_type = { 383static const struct config_item_type stp_policies_type = {
384 .ct_group_ops = &stp_policies_group_ops, 384 .ct_group_ops = &stp_policies_group_ops,
385 .ct_owner = THIS_MODULE, 385 .ct_owner = THIS_MODULE,
386}; 386};
diff --git a/drivers/iio/dummy/iio_simple_dummy.c b/drivers/iio/dummy/iio_simple_dummy.c
index a45d01e9b8e8..62052479c349 100644
--- a/drivers/iio/dummy/iio_simple_dummy.c
+++ b/drivers/iio/dummy/iio_simple_dummy.c
@@ -26,7 +26,7 @@
26#include <linux/iio/sw_device.h> 26#include <linux/iio/sw_device.h>
27#include "iio_simple_dummy.h" 27#include "iio_simple_dummy.h"
28 28
29static struct config_item_type iio_dummy_type = { 29static const struct config_item_type iio_dummy_type = {
30 .ct_owner = THIS_MODULE, 30 .ct_owner = THIS_MODULE,
31}; 31};
32 32
diff --git a/drivers/iio/industrialio-configfs.c b/drivers/iio/industrialio-configfs.c
index 45ce2bc47180..5a0aae119369 100644
--- a/drivers/iio/industrialio-configfs.c
+++ b/drivers/iio/industrialio-configfs.c
@@ -17,7 +17,7 @@
17#include <linux/iio/iio.h> 17#include <linux/iio/iio.h>
18#include <linux/iio/configfs.h> 18#include <linux/iio/configfs.h>
19 19
20static struct config_item_type iio_root_group_type = { 20static const struct config_item_type iio_root_group_type = {
21 .ct_owner = THIS_MODULE, 21 .ct_owner = THIS_MODULE,
22}; 22};
23 23
diff --git a/drivers/iio/industrialio-sw-device.c b/drivers/iio/industrialio-sw-device.c
index 81b49cfca452..90df97c542f6 100644
--- a/drivers/iio/industrialio-sw-device.c
+++ b/drivers/iio/industrialio-sw-device.c
@@ -19,9 +19,9 @@
19#include <linux/configfs.h> 19#include <linux/configfs.h>
20 20
21static struct config_group *iio_devices_group; 21static struct config_group *iio_devices_group;
22static struct config_item_type iio_device_type_group_type; 22static const struct config_item_type iio_device_type_group_type;
23 23
24static struct config_item_type iio_devices_group_type = { 24static const struct config_item_type iio_devices_group_type = {
25 .ct_owner = THIS_MODULE, 25 .ct_owner = THIS_MODULE,
26}; 26};
27 27
@@ -156,7 +156,7 @@ static struct configfs_group_operations device_ops = {
156 .drop_item = &device_drop_group, 156 .drop_item = &device_drop_group,
157}; 157};
158 158
159static struct config_item_type iio_device_type_group_type = { 159static const struct config_item_type iio_device_type_group_type = {
160 .ct_group_ops = &device_ops, 160 .ct_group_ops = &device_ops,
161 .ct_owner = THIS_MODULE, 161 .ct_owner = THIS_MODULE,
162}; 162};
diff --git a/drivers/iio/industrialio-sw-trigger.c b/drivers/iio/industrialio-sw-trigger.c
index 8d24fb159cc9..bc6b7fb43e3a 100644
--- a/drivers/iio/industrialio-sw-trigger.c
+++ b/drivers/iio/industrialio-sw-trigger.c
@@ -19,9 +19,9 @@
19#include <linux/configfs.h> 19#include <linux/configfs.h>
20 20
21static struct config_group *iio_triggers_group; 21static struct config_group *iio_triggers_group;
22static struct config_item_type iio_trigger_type_group_type; 22static const struct config_item_type iio_trigger_type_group_type;
23 23
24static struct config_item_type iio_triggers_group_type = { 24static const struct config_item_type iio_triggers_group_type = {
25 .ct_owner = THIS_MODULE, 25 .ct_owner = THIS_MODULE,
26}; 26};
27 27
@@ -156,7 +156,7 @@ static struct configfs_group_operations trigger_ops = {
156 .drop_item = &trigger_drop_group, 156 .drop_item = &trigger_drop_group,
157}; 157};
158 158
159static struct config_item_type iio_trigger_type_group_type = { 159static const struct config_item_type iio_trigger_type_group_type = {
160 .ct_group_ops = &trigger_ops, 160 .ct_group_ops = &trigger_ops,
161 .ct_owner = THIS_MODULE, 161 .ct_owner = THIS_MODULE,
162}; 162};
diff --git a/drivers/iio/trigger/iio-trig-hrtimer.c b/drivers/iio/trigger/iio-trig-hrtimer.c
index 3ee92160053f..7accd0187ba1 100644
--- a/drivers/iio/trigger/iio-trig-hrtimer.c
+++ b/drivers/iio/trigger/iio-trig-hrtimer.c
@@ -30,7 +30,7 @@ struct iio_hrtimer_info {
30 ktime_t period; 30 ktime_t period;
31}; 31};
32 32
33static struct config_item_type iio_hrtimer_type = { 33static const struct config_item_type iio_hrtimer_type = {
34 .ct_owner = THIS_MODULE, 34 .ct_owner = THIS_MODULE,
35}; 35};
36 36
diff --git a/drivers/iio/trigger/iio-trig-loop.c b/drivers/iio/trigger/iio-trig-loop.c
index b4b02dbd6e8a..94a90e0a3fdb 100644
--- a/drivers/iio/trigger/iio-trig-loop.c
+++ b/drivers/iio/trigger/iio-trig-loop.c
@@ -36,7 +36,7 @@ struct iio_loop_info {
36 struct task_struct *task; 36 struct task_struct *task;
37}; 37};
38 38
39static struct config_item_type iio_loop_type = { 39static const struct config_item_type iio_loop_type = {
40 .ct_owner = THIS_MODULE, 40 .ct_owner = THIS_MODULE,
41}; 41};
42 42
diff --git a/drivers/infiniband/core/cma_configfs.c b/drivers/infiniband/core/cma_configfs.c
index 54076a3e8007..31dfee0c8295 100644
--- a/drivers/infiniband/core/cma_configfs.c
+++ b/drivers/infiniband/core/cma_configfs.c
@@ -186,7 +186,7 @@ static struct configfs_attribute *cma_configfs_attributes[] = {
186 NULL, 186 NULL,
187}; 187};
188 188
189static struct config_item_type cma_port_group_type = { 189static const struct config_item_type cma_port_group_type = {
190 .ct_attrs = cma_configfs_attributes, 190 .ct_attrs = cma_configfs_attributes,
191 .ct_owner = THIS_MODULE 191 .ct_owner = THIS_MODULE
192}; 192};
@@ -263,7 +263,7 @@ static struct configfs_item_operations cma_ports_item_ops = {
263 .release = release_cma_ports_group 263 .release = release_cma_ports_group
264}; 264};
265 265
266static struct config_item_type cma_ports_group_type = { 266static const struct config_item_type cma_ports_group_type = {
267 .ct_item_ops = &cma_ports_item_ops, 267 .ct_item_ops = &cma_ports_item_ops,
268 .ct_owner = THIS_MODULE 268 .ct_owner = THIS_MODULE
269}; 269};
@@ -272,7 +272,7 @@ static struct configfs_item_operations cma_device_item_ops = {
272 .release = release_cma_dev 272 .release = release_cma_dev
273}; 273};
274 274
275static struct config_item_type cma_device_group_type = { 275static const struct config_item_type cma_device_group_type = {
276 .ct_item_ops = &cma_device_item_ops, 276 .ct_item_ops = &cma_device_item_ops,
277 .ct_owner = THIS_MODULE 277 .ct_owner = THIS_MODULE
278}; 278};
@@ -323,7 +323,7 @@ static struct configfs_group_operations cma_subsys_group_ops = {
323 .make_group = make_cma_dev, 323 .make_group = make_cma_dev,
324}; 324};
325 325
326static struct config_item_type cma_subsys_type = { 326static const struct config_item_type cma_subsys_type = {
327 .ct_group_ops = &cma_subsys_group_ops, 327 .ct_group_ops = &cma_subsys_group_ops,
328 .ct_owner = THIS_MODULE, 328 .ct_owner = THIS_MODULE,
329}; 329};
diff --git a/drivers/net/netconsole.c b/drivers/net/netconsole.c
index 0e27920c2b6b..be9aa368639f 100644
--- a/drivers/net/netconsole.c
+++ b/drivers/net/netconsole.c
@@ -616,7 +616,7 @@ static struct configfs_item_operations netconsole_target_item_ops = {
616 .release = netconsole_target_release, 616 .release = netconsole_target_release,
617}; 617};
618 618
619static struct config_item_type netconsole_target_type = { 619static const struct config_item_type netconsole_target_type = {
620 .ct_attrs = netconsole_target_attrs, 620 .ct_attrs = netconsole_target_attrs,
621 .ct_item_ops = &netconsole_target_item_ops, 621 .ct_item_ops = &netconsole_target_item_ops,
622 .ct_owner = THIS_MODULE, 622 .ct_owner = THIS_MODULE,
@@ -682,7 +682,7 @@ static struct configfs_group_operations netconsole_subsys_group_ops = {
682 .drop_item = drop_netconsole_target, 682 .drop_item = drop_netconsole_target,
683}; 683};
684 684
685static struct config_item_type netconsole_subsys_type = { 685static const struct config_item_type netconsole_subsys_type = {
686 .ct_group_ops = &netconsole_subsys_group_ops, 686 .ct_group_ops = &netconsole_subsys_group_ops,
687 .ct_owner = THIS_MODULE, 687 .ct_owner = THIS_MODULE,
688}; 688};
diff --git a/drivers/nvme/target/configfs.c b/drivers/nvme/target/configfs.c
index b6aeb1d70951..e6b2d2af81b6 100644
--- a/drivers/nvme/target/configfs.c
+++ b/drivers/nvme/target/configfs.c
@@ -20,8 +20,8 @@
20 20
21#include "nvmet.h" 21#include "nvmet.h"
22 22
23static struct config_item_type nvmet_host_type; 23static const struct config_item_type nvmet_host_type;
24static struct config_item_type nvmet_subsys_type; 24static const struct config_item_type nvmet_subsys_type;
25 25
26/* 26/*
27 * nvmet_port Generic ConfigFS definitions. 27 * nvmet_port Generic ConfigFS definitions.
@@ -425,7 +425,7 @@ static struct configfs_item_operations nvmet_ns_item_ops = {
425 .release = nvmet_ns_release, 425 .release = nvmet_ns_release,
426}; 426};
427 427
428static struct config_item_type nvmet_ns_type = { 428static const struct config_item_type nvmet_ns_type = {
429 .ct_item_ops = &nvmet_ns_item_ops, 429 .ct_item_ops = &nvmet_ns_item_ops,
430 .ct_attrs = nvmet_ns_attrs, 430 .ct_attrs = nvmet_ns_attrs,
431 .ct_owner = THIS_MODULE, 431 .ct_owner = THIS_MODULE,
@@ -464,7 +464,7 @@ static struct configfs_group_operations nvmet_namespaces_group_ops = {
464 .make_group = nvmet_ns_make, 464 .make_group = nvmet_ns_make,
465}; 465};
466 466
467static struct config_item_type nvmet_namespaces_type = { 467static const struct config_item_type nvmet_namespaces_type = {
468 .ct_group_ops = &nvmet_namespaces_group_ops, 468 .ct_group_ops = &nvmet_namespaces_group_ops,
469 .ct_owner = THIS_MODULE, 469 .ct_owner = THIS_MODULE,
470}; 470};
@@ -540,7 +540,7 @@ static struct configfs_item_operations nvmet_port_subsys_item_ops = {
540 .drop_link = nvmet_port_subsys_drop_link, 540 .drop_link = nvmet_port_subsys_drop_link,
541}; 541};
542 542
543static struct config_item_type nvmet_port_subsys_type = { 543static const struct config_item_type nvmet_port_subsys_type = {
544 .ct_item_ops = &nvmet_port_subsys_item_ops, 544 .ct_item_ops = &nvmet_port_subsys_item_ops,
545 .ct_owner = THIS_MODULE, 545 .ct_owner = THIS_MODULE,
546}; 546};
@@ -613,7 +613,7 @@ static struct configfs_item_operations nvmet_allowed_hosts_item_ops = {
613 .drop_link = nvmet_allowed_hosts_drop_link, 613 .drop_link = nvmet_allowed_hosts_drop_link,
614}; 614};
615 615
616static struct config_item_type nvmet_allowed_hosts_type = { 616static const struct config_item_type nvmet_allowed_hosts_type = {
617 .ct_item_ops = &nvmet_allowed_hosts_item_ops, 617 .ct_item_ops = &nvmet_allowed_hosts_item_ops,
618 .ct_owner = THIS_MODULE, 618 .ct_owner = THIS_MODULE,
619}; 619};
@@ -729,7 +729,7 @@ static struct configfs_item_operations nvmet_subsys_item_ops = {
729 .release = nvmet_subsys_release, 729 .release = nvmet_subsys_release,
730}; 730};
731 731
732static struct config_item_type nvmet_subsys_type = { 732static const struct config_item_type nvmet_subsys_type = {
733 .ct_item_ops = &nvmet_subsys_item_ops, 733 .ct_item_ops = &nvmet_subsys_item_ops,
734 .ct_attrs = nvmet_subsys_attrs, 734 .ct_attrs = nvmet_subsys_attrs,
735 .ct_owner = THIS_MODULE, 735 .ct_owner = THIS_MODULE,
@@ -767,7 +767,7 @@ static struct configfs_group_operations nvmet_subsystems_group_ops = {
767 .make_group = nvmet_subsys_make, 767 .make_group = nvmet_subsys_make,
768}; 768};
769 769
770static struct config_item_type nvmet_subsystems_type = { 770static const struct config_item_type nvmet_subsystems_type = {
771 .ct_group_ops = &nvmet_subsystems_group_ops, 771 .ct_group_ops = &nvmet_subsystems_group_ops,
772 .ct_owner = THIS_MODULE, 772 .ct_owner = THIS_MODULE,
773}; 773};
@@ -827,7 +827,7 @@ static struct configfs_item_operations nvmet_referral_item_ops = {
827 .release = nvmet_referral_release, 827 .release = nvmet_referral_release,
828}; 828};
829 829
830static struct config_item_type nvmet_referral_type = { 830static const struct config_item_type nvmet_referral_type = {
831 .ct_owner = THIS_MODULE, 831 .ct_owner = THIS_MODULE,
832 .ct_attrs = nvmet_referral_attrs, 832 .ct_attrs = nvmet_referral_attrs,
833 .ct_item_ops = &nvmet_referral_item_ops, 833 .ct_item_ops = &nvmet_referral_item_ops,
@@ -852,7 +852,7 @@ static struct configfs_group_operations nvmet_referral_group_ops = {
852 .make_group = nvmet_referral_make, 852 .make_group = nvmet_referral_make,
853}; 853};
854 854
855static struct config_item_type nvmet_referrals_type = { 855static const struct config_item_type nvmet_referrals_type = {
856 .ct_owner = THIS_MODULE, 856 .ct_owner = THIS_MODULE,
857 .ct_group_ops = &nvmet_referral_group_ops, 857 .ct_group_ops = &nvmet_referral_group_ops,
858}; 858};
@@ -880,7 +880,7 @@ static struct configfs_item_operations nvmet_port_item_ops = {
880 .release = nvmet_port_release, 880 .release = nvmet_port_release,
881}; 881};
882 882
883static struct config_item_type nvmet_port_type = { 883static const struct config_item_type nvmet_port_type = {
884 .ct_attrs = nvmet_port_attrs, 884 .ct_attrs = nvmet_port_attrs,
885 .ct_item_ops = &nvmet_port_item_ops, 885 .ct_item_ops = &nvmet_port_item_ops,
886 .ct_owner = THIS_MODULE, 886 .ct_owner = THIS_MODULE,
@@ -921,7 +921,7 @@ static struct configfs_group_operations nvmet_ports_group_ops = {
921 .make_group = nvmet_ports_make, 921 .make_group = nvmet_ports_make,
922}; 922};
923 923
924static struct config_item_type nvmet_ports_type = { 924static const struct config_item_type nvmet_ports_type = {
925 .ct_group_ops = &nvmet_ports_group_ops, 925 .ct_group_ops = &nvmet_ports_group_ops,
926 .ct_owner = THIS_MODULE, 926 .ct_owner = THIS_MODULE,
927}; 927};
@@ -940,7 +940,7 @@ static struct configfs_item_operations nvmet_host_item_ops = {
940 .release = nvmet_host_release, 940 .release = nvmet_host_release,
941}; 941};
942 942
943static struct config_item_type nvmet_host_type = { 943static const struct config_item_type nvmet_host_type = {
944 .ct_item_ops = &nvmet_host_item_ops, 944 .ct_item_ops = &nvmet_host_item_ops,
945 .ct_owner = THIS_MODULE, 945 .ct_owner = THIS_MODULE,
946}; 946};
@@ -963,14 +963,14 @@ static struct configfs_group_operations nvmet_hosts_group_ops = {
963 .make_group = nvmet_hosts_make_group, 963 .make_group = nvmet_hosts_make_group,
964}; 964};
965 965
966static struct config_item_type nvmet_hosts_type = { 966static const struct config_item_type nvmet_hosts_type = {
967 .ct_group_ops = &nvmet_hosts_group_ops, 967 .ct_group_ops = &nvmet_hosts_group_ops,
968 .ct_owner = THIS_MODULE, 968 .ct_owner = THIS_MODULE,
969}; 969};
970 970
971static struct config_group nvmet_hosts_group; 971static struct config_group nvmet_hosts_group;
972 972
973static struct config_item_type nvmet_root_type = { 973static const struct config_item_type nvmet_root_type = {
974 .ct_owner = THIS_MODULE, 974 .ct_owner = THIS_MODULE,
975}; 975};
976 976
diff --git a/drivers/pci/endpoint/pci-ep-cfs.c b/drivers/pci/endpoint/pci-ep-cfs.c
index 424fdd6ed1ca..4f74386c1ced 100644
--- a/drivers/pci/endpoint/pci-ep-cfs.c
+++ b/drivers/pci/endpoint/pci-ep-cfs.c
@@ -150,7 +150,7 @@ static struct configfs_item_operations pci_epc_item_ops = {
150 .drop_link = pci_epc_epf_unlink, 150 .drop_link = pci_epc_epf_unlink,
151}; 151};
152 152
153static struct config_item_type pci_epc_type = { 153static const struct config_item_type pci_epc_type = {
154 .ct_item_ops = &pci_epc_item_ops, 154 .ct_item_ops = &pci_epc_item_ops,
155 .ct_attrs = pci_epc_attrs, 155 .ct_attrs = pci_epc_attrs,
156 .ct_owner = THIS_MODULE, 156 .ct_owner = THIS_MODULE,
@@ -361,7 +361,7 @@ static struct configfs_item_operations pci_epf_ops = {
361 .release = pci_epf_release, 361 .release = pci_epf_release,
362}; 362};
363 363
364static struct config_item_type pci_epf_type = { 364static const struct config_item_type pci_epf_type = {
365 .ct_item_ops = &pci_epf_ops, 365 .ct_item_ops = &pci_epf_ops,
366 .ct_attrs = pci_epf_attrs, 366 .ct_attrs = pci_epf_attrs,
367 .ct_owner = THIS_MODULE, 367 .ct_owner = THIS_MODULE,
@@ -400,7 +400,7 @@ static struct configfs_group_operations pci_epf_group_ops = {
400 .drop_item = &pci_epf_drop, 400 .drop_item = &pci_epf_drop,
401}; 401};
402 402
403static struct config_item_type pci_epf_group_type = { 403static const struct config_item_type pci_epf_group_type = {
404 .ct_group_ops = &pci_epf_group_ops, 404 .ct_group_ops = &pci_epf_group_ops,
405 .ct_owner = THIS_MODULE, 405 .ct_owner = THIS_MODULE,
406}; 406};
@@ -428,15 +428,15 @@ void pci_ep_cfs_remove_epf_group(struct config_group *group)
428} 428}
429EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group); 429EXPORT_SYMBOL(pci_ep_cfs_remove_epf_group);
430 430
431static struct config_item_type pci_functions_type = { 431static const struct config_item_type pci_functions_type = {
432 .ct_owner = THIS_MODULE, 432 .ct_owner = THIS_MODULE,
433}; 433};
434 434
435static struct config_item_type pci_controllers_type = { 435static const struct config_item_type pci_controllers_type = {
436 .ct_owner = THIS_MODULE, 436 .ct_owner = THIS_MODULE,
437}; 437};
438 438
439static struct config_item_type pci_ep_type = { 439static const struct config_item_type pci_ep_type = {
440 .ct_owner = THIS_MODULE, 440 .ct_owner = THIS_MODULE,
441}; 441};
442 442
diff --git a/drivers/target/iscsi/iscsi_target_stat.c b/drivers/target/iscsi/iscsi_target_stat.c
index 411cb266a47d..df0a39811dc2 100644
--- a/drivers/target/iscsi/iscsi_target_stat.c
+++ b/drivers/target/iscsi/iscsi_target_stat.c
@@ -187,7 +187,7 @@ static struct configfs_attribute *iscsi_stat_instance_attrs[] = {
187 NULL, 187 NULL,
188}; 188};
189 189
190struct config_item_type iscsi_stat_instance_cit = { 190const struct config_item_type iscsi_stat_instance_cit = {
191 .ct_attrs = iscsi_stat_instance_attrs, 191 .ct_attrs = iscsi_stat_instance_attrs,
192 .ct_owner = THIS_MODULE, 192 .ct_owner = THIS_MODULE,
193}; 193};
@@ -249,7 +249,7 @@ static struct configfs_attribute *iscsi_stat_sess_err_attrs[] = {
249 NULL, 249 NULL,
250}; 250};
251 251
252struct config_item_type iscsi_stat_sess_err_cit = { 252const struct config_item_type iscsi_stat_sess_err_cit = {
253 .ct_attrs = iscsi_stat_sess_err_attrs, 253 .ct_attrs = iscsi_stat_sess_err_attrs,
254 .ct_owner = THIS_MODULE, 254 .ct_owner = THIS_MODULE,
255}; 255};
@@ -390,7 +390,7 @@ static struct configfs_attribute *iscsi_stat_tgt_attr_attrs[] = {
390 NULL, 390 NULL,
391}; 391};
392 392
393struct config_item_type iscsi_stat_tgt_attr_cit = { 393const struct config_item_type iscsi_stat_tgt_attr_cit = {
394 .ct_attrs = iscsi_stat_tgt_attr_attrs, 394 .ct_attrs = iscsi_stat_tgt_attr_attrs,
395 .ct_owner = THIS_MODULE, 395 .ct_owner = THIS_MODULE,
396}; 396};
@@ -522,7 +522,7 @@ static struct configfs_attribute *iscsi_stat_login_stats_attrs[] = {
522 NULL, 522 NULL,
523}; 523};
524 524
525struct config_item_type iscsi_stat_login_cit = { 525const struct config_item_type iscsi_stat_login_cit = {
526 .ct_attrs = iscsi_stat_login_stats_attrs, 526 .ct_attrs = iscsi_stat_login_stats_attrs,
527 .ct_owner = THIS_MODULE, 527 .ct_owner = THIS_MODULE,
528}; 528};
@@ -579,7 +579,7 @@ static struct configfs_attribute *iscsi_stat_logout_stats_attrs[] = {
579 NULL, 579 NULL,
580}; 580};
581 581
582struct config_item_type iscsi_stat_logout_cit = { 582const struct config_item_type iscsi_stat_logout_cit = {
583 .ct_attrs = iscsi_stat_logout_stats_attrs, 583 .ct_attrs = iscsi_stat_logout_stats_attrs,
584 .ct_owner = THIS_MODULE, 584 .ct_owner = THIS_MODULE,
585}; 585};
@@ -801,7 +801,7 @@ static struct configfs_attribute *iscsi_stat_sess_stats_attrs[] = {
801 NULL, 801 NULL,
802}; 802};
803 803
804struct config_item_type iscsi_stat_sess_cit = { 804const struct config_item_type iscsi_stat_sess_cit = {
805 .ct_attrs = iscsi_stat_sess_stats_attrs, 805 .ct_attrs = iscsi_stat_sess_stats_attrs,
806 .ct_owner = THIS_MODULE, 806 .ct_owner = THIS_MODULE,
807}; 807};
diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 7e87d952bb7a..bd87cc26c6e5 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -307,7 +307,7 @@ static struct configfs_attribute *target_core_fabric_item_attrs[] = {
307/* 307/*
308 * Provides Fabrics Groups and Item Attributes for /sys/kernel/config/target/ 308 * Provides Fabrics Groups and Item Attributes for /sys/kernel/config/target/
309 */ 309 */
310static struct config_item_type target_core_fabrics_item = { 310static const struct config_item_type target_core_fabrics_item = {
311 .ct_group_ops = &target_core_fabric_group_ops, 311 .ct_group_ops = &target_core_fabric_group_ops,
312 .ct_attrs = target_core_fabric_item_attrs, 312 .ct_attrs = target_core_fabric_item_attrs,
313 .ct_owner = THIS_MODULE, 313 .ct_owner = THIS_MODULE,
@@ -2376,7 +2376,7 @@ static struct configfs_item_operations target_core_alua_lu_gp_ops = {
2376 .release = target_core_alua_lu_gp_release, 2376 .release = target_core_alua_lu_gp_release,
2377}; 2377};
2378 2378
2379static struct config_item_type target_core_alua_lu_gp_cit = { 2379static const struct config_item_type target_core_alua_lu_gp_cit = {
2380 .ct_item_ops = &target_core_alua_lu_gp_ops, 2380 .ct_item_ops = &target_core_alua_lu_gp_ops,
2381 .ct_attrs = target_core_alua_lu_gp_attrs, 2381 .ct_attrs = target_core_alua_lu_gp_attrs,
2382 .ct_owner = THIS_MODULE, 2382 .ct_owner = THIS_MODULE,
@@ -2434,7 +2434,7 @@ static struct configfs_group_operations target_core_alua_lu_gps_group_ops = {
2434 .drop_item = &target_core_alua_drop_lu_gp, 2434 .drop_item = &target_core_alua_drop_lu_gp,
2435}; 2435};
2436 2436
2437static struct config_item_type target_core_alua_lu_gps_cit = { 2437static const struct config_item_type target_core_alua_lu_gps_cit = {
2438 .ct_item_ops = NULL, 2438 .ct_item_ops = NULL,
2439 .ct_group_ops = &target_core_alua_lu_gps_group_ops, 2439 .ct_group_ops = &target_core_alua_lu_gps_group_ops,
2440 .ct_owner = THIS_MODULE, 2440 .ct_owner = THIS_MODULE,
@@ -2813,7 +2813,7 @@ static struct configfs_item_operations target_core_alua_tg_pt_gp_ops = {
2813 .release = target_core_alua_tg_pt_gp_release, 2813 .release = target_core_alua_tg_pt_gp_release,
2814}; 2814};
2815 2815
2816static struct config_item_type target_core_alua_tg_pt_gp_cit = { 2816static const struct config_item_type target_core_alua_tg_pt_gp_cit = {
2817 .ct_item_ops = &target_core_alua_tg_pt_gp_ops, 2817 .ct_item_ops = &target_core_alua_tg_pt_gp_ops,
2818 .ct_attrs = target_core_alua_tg_pt_gp_attrs, 2818 .ct_attrs = target_core_alua_tg_pt_gp_attrs,
2819 .ct_owner = THIS_MODULE, 2819 .ct_owner = THIS_MODULE,
@@ -2884,7 +2884,7 @@ TB_CIT_SETUP(dev_alua_tg_pt_gps, NULL, &target_core_alua_tg_pt_gps_group_ops, NU
2884 * core/alua/lu_gps and core/alua/tg_pt_gps that are attached to 2884 * core/alua/lu_gps and core/alua/tg_pt_gps that are attached to
2885 * target_core_alua_cit in target_core_init_configfs() below. 2885 * target_core_alua_cit in target_core_init_configfs() below.
2886 */ 2886 */
2887static struct config_item_type target_core_alua_cit = { 2887static const struct config_item_type target_core_alua_cit = {
2888 .ct_item_ops = NULL, 2888 .ct_item_ops = NULL,
2889 .ct_attrs = NULL, 2889 .ct_attrs = NULL,
2890 .ct_owner = THIS_MODULE, 2890 .ct_owner = THIS_MODULE,
@@ -3105,7 +3105,7 @@ static struct configfs_item_operations target_core_hba_item_ops = {
3105 .release = target_core_hba_release, 3105 .release = target_core_hba_release,
3106}; 3106};
3107 3107
3108static struct config_item_type target_core_hba_cit = { 3108static const struct config_item_type target_core_hba_cit = {
3109 .ct_item_ops = &target_core_hba_item_ops, 3109 .ct_item_ops = &target_core_hba_item_ops,
3110 .ct_group_ops = &target_core_hba_group_ops, 3110 .ct_group_ops = &target_core_hba_group_ops,
3111 .ct_attrs = target_core_hba_attrs, 3111 .ct_attrs = target_core_hba_attrs,
@@ -3188,7 +3188,7 @@ static struct configfs_group_operations target_core_group_ops = {
3188 .drop_item = target_core_call_delhbafromtarget, 3188 .drop_item = target_core_call_delhbafromtarget,
3189}; 3189};
3190 3190
3191static struct config_item_type target_core_cit = { 3191static const struct config_item_type target_core_cit = {
3192 .ct_item_ops = NULL, 3192 .ct_item_ops = NULL,
3193 .ct_group_ops = &target_core_group_ops, 3193 .ct_group_ops = &target_core_group_ops,
3194 .ct_attrs = NULL, 3194 .ct_attrs = NULL,
diff --git a/drivers/target/target_core_stat.c b/drivers/target/target_core_stat.c
index 8038255b21e8..f0db91ebd735 100644
--- a/drivers/target/target_core_stat.c
+++ b/drivers/target/target_core_stat.c
@@ -96,7 +96,7 @@ static struct configfs_attribute *target_stat_scsi_dev_attrs[] = {
96 NULL, 96 NULL,
97}; 97};
98 98
99static struct config_item_type target_stat_scsi_dev_cit = { 99static const struct config_item_type target_stat_scsi_dev_cit = {
100 .ct_attrs = target_stat_scsi_dev_attrs, 100 .ct_attrs = target_stat_scsi_dev_attrs,
101 .ct_owner = THIS_MODULE, 101 .ct_owner = THIS_MODULE,
102}; 102};
@@ -193,7 +193,7 @@ static struct configfs_attribute *target_stat_scsi_tgt_dev_attrs[] = {
193 NULL, 193 NULL,
194}; 194};
195 195
196static struct config_item_type target_stat_scsi_tgt_dev_cit = { 196static const struct config_item_type target_stat_scsi_tgt_dev_cit = {
197 .ct_attrs = target_stat_scsi_tgt_dev_attrs, 197 .ct_attrs = target_stat_scsi_tgt_dev_attrs,
198 .ct_owner = THIS_MODULE, 198 .ct_owner = THIS_MODULE,
199}; 199};
@@ -414,7 +414,7 @@ static struct configfs_attribute *target_stat_scsi_lu_attrs[] = {
414 NULL, 414 NULL,
415}; 415};
416 416
417static struct config_item_type target_stat_scsi_lu_cit = { 417static const struct config_item_type target_stat_scsi_lu_cit = {
418 .ct_attrs = target_stat_scsi_lu_attrs, 418 .ct_attrs = target_stat_scsi_lu_attrs,
419 .ct_owner = THIS_MODULE, 419 .ct_owner = THIS_MODULE,
420}; 420};
@@ -540,7 +540,7 @@ static struct configfs_attribute *target_stat_scsi_port_attrs[] = {
540 NULL, 540 NULL,
541}; 541};
542 542
543static struct config_item_type target_stat_scsi_port_cit = { 543static const struct config_item_type target_stat_scsi_port_cit = {
544 .ct_attrs = target_stat_scsi_port_attrs, 544 .ct_attrs = target_stat_scsi_port_attrs,
545 .ct_owner = THIS_MODULE, 545 .ct_owner = THIS_MODULE,
546}; 546};
@@ -724,7 +724,7 @@ static struct configfs_attribute *target_stat_scsi_tgt_port_attrs[] = {
724 NULL, 724 NULL,
725}; 725};
726 726
727static struct config_item_type target_stat_scsi_tgt_port_cit = { 727static const struct config_item_type target_stat_scsi_tgt_port_cit = {
728 .ct_attrs = target_stat_scsi_tgt_port_attrs, 728 .ct_attrs = target_stat_scsi_tgt_port_attrs,
729 .ct_owner = THIS_MODULE, 729 .ct_owner = THIS_MODULE,
730}; 730};
@@ -844,7 +844,7 @@ static struct configfs_attribute *target_stat_scsi_transport_attrs[] = {
844 NULL, 844 NULL,
845}; 845};
846 846
847static struct config_item_type target_stat_scsi_transport_cit = { 847static const struct config_item_type target_stat_scsi_transport_cit = {
848 .ct_attrs = target_stat_scsi_transport_attrs, 848 .ct_attrs = target_stat_scsi_transport_attrs,
849 .ct_owner = THIS_MODULE, 849 .ct_owner = THIS_MODULE,
850}; 850};
@@ -1206,7 +1206,7 @@ static struct configfs_attribute *target_stat_scsi_auth_intr_attrs[] = {
1206 NULL, 1206 NULL,
1207}; 1207};
1208 1208
1209static struct config_item_type target_stat_scsi_auth_intr_cit = { 1209static const struct config_item_type target_stat_scsi_auth_intr_cit = {
1210 .ct_attrs = target_stat_scsi_auth_intr_attrs, 1210 .ct_attrs = target_stat_scsi_auth_intr_attrs,
1211 .ct_owner = THIS_MODULE, 1211 .ct_owner = THIS_MODULE,
1212}; 1212};
@@ -1378,7 +1378,7 @@ static struct configfs_attribute *target_stat_scsi_ath_intr_port_attrs[] = {
1378 NULL, 1378 NULL,
1379}; 1379};
1380 1380
1381static struct config_item_type target_stat_scsi_att_intr_port_cit = { 1381static const struct config_item_type target_stat_scsi_att_intr_port_cit = {
1382 .ct_attrs = target_stat_scsi_ath_intr_port_attrs, 1382 .ct_attrs = target_stat_scsi_ath_intr_port_attrs,
1383 .ct_owner = THIS_MODULE, 1383 .ct_owner = THIS_MODULE,
1384}; 1384};
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 4ddf063b9f47..efba66ca0719 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -506,13 +506,13 @@ static struct configfs_attribute *gadget_config_attrs[] = {
506 NULL, 506 NULL,
507}; 507};
508 508
509static struct config_item_type gadget_config_type = { 509static const struct config_item_type gadget_config_type = {
510 .ct_item_ops = &gadget_config_item_ops, 510 .ct_item_ops = &gadget_config_item_ops,
511 .ct_attrs = gadget_config_attrs, 511 .ct_attrs = gadget_config_attrs,
512 .ct_owner = THIS_MODULE, 512 .ct_owner = THIS_MODULE,
513}; 513};
514 514
515static struct config_item_type gadget_root_type = { 515static const struct config_item_type gadget_root_type = {
516 .ct_item_ops = &gadget_root_item_ops, 516 .ct_item_ops = &gadget_root_item_ops,
517 .ct_attrs = gadget_root_attrs, 517 .ct_attrs = gadget_root_attrs,
518 .ct_owner = THIS_MODULE, 518 .ct_owner = THIS_MODULE,
@@ -594,7 +594,7 @@ static struct configfs_group_operations functions_ops = {
594 .drop_item = &function_drop, 594 .drop_item = &function_drop,
595}; 595};
596 596
597static struct config_item_type functions_type = { 597static const struct config_item_type functions_type = {
598 .ct_group_ops = &functions_ops, 598 .ct_group_ops = &functions_ops,
599 .ct_owner = THIS_MODULE, 599 .ct_owner = THIS_MODULE,
600}; 600};
@@ -695,7 +695,7 @@ static struct configfs_group_operations config_desc_ops = {
695 .drop_item = &config_desc_drop, 695 .drop_item = &config_desc_drop,
696}; 696};
697 697
698static struct config_item_type config_desc_type = { 698static const struct config_item_type config_desc_type = {
699 .ct_group_ops = &config_desc_ops, 699 .ct_group_ops = &config_desc_ops,
700 .ct_owner = THIS_MODULE, 700 .ct_owner = THIS_MODULE,
701}; 701};
@@ -1477,7 +1477,7 @@ static struct configfs_group_operations gadgets_ops = {
1477 .drop_item = &gadgets_drop, 1477 .drop_item = &gadgets_drop,
1478}; 1478};
1479 1479
1480static struct config_item_type gadgets_type = { 1480static const struct config_item_type gadgets_type = {
1481 .ct_group_ops = &gadgets_ops, 1481 .ct_group_ops = &gadgets_ops,
1482 .ct_owner = THIS_MODULE, 1482 .ct_owner = THIS_MODULE,
1483}; 1483};
diff --git a/drivers/usb/gadget/function/f_acm.c b/drivers/usb/gadget/function/f_acm.c
index 7140bf3c74fa..9fc98de83624 100644
--- a/drivers/usb/gadget/function/f_acm.c
+++ b/drivers/usb/gadget/function/f_acm.c
@@ -783,7 +783,7 @@ static struct configfs_attribute *acm_attrs[] = {
783 NULL, 783 NULL,
784}; 784};
785 785
786static struct config_item_type acm_func_type = { 786static const struct config_item_type acm_func_type = {
787 .ct_item_ops = &acm_item_ops, 787 .ct_item_ops = &acm_item_ops,
788 .ct_attrs = acm_attrs, 788 .ct_attrs = acm_attrs,
789 .ct_owner = THIS_MODULE, 789 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_ecm.c b/drivers/usb/gadget/function/f_ecm.c
index b322ca20cd98..b104ed0c1ab5 100644
--- a/drivers/usb/gadget/function/f_ecm.c
+++ b/drivers/usb/gadget/function/f_ecm.c
@@ -841,7 +841,7 @@ static struct configfs_attribute *ecm_attrs[] = {
841 NULL, 841 NULL,
842}; 842};
843 843
844static struct config_item_type ecm_func_type = { 844static const struct config_item_type ecm_func_type = {
845 .ct_item_ops = &ecm_item_ops, 845 .ct_item_ops = &ecm_item_ops,
846 .ct_attrs = ecm_attrs, 846 .ct_attrs = ecm_attrs,
847 .ct_owner = THIS_MODULE, 847 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_eem.c b/drivers/usb/gadget/function/f_eem.c
index def3a450a340..37557651b600 100644
--- a/drivers/usb/gadget/function/f_eem.c
+++ b/drivers/usb/gadget/function/f_eem.c
@@ -552,7 +552,7 @@ static struct configfs_attribute *eem_attrs[] = {
552 NULL, 552 NULL,
553}; 553};
554 554
555static struct config_item_type eem_func_type = { 555static const struct config_item_type eem_func_type = {
556 .ct_item_ops = &eem_item_ops, 556 .ct_item_ops = &eem_item_ops,
557 .ct_attrs = eem_attrs, 557 .ct_attrs = eem_attrs,
558 .ct_owner = THIS_MODULE, 558 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c
index b1001c3f43fb..97ea059a7aa4 100644
--- a/drivers/usb/gadget/function/f_fs.c
+++ b/drivers/usb/gadget/function/f_fs.c
@@ -3381,7 +3381,7 @@ static struct configfs_item_operations ffs_item_ops = {
3381 .release = ffs_attr_release, 3381 .release = ffs_attr_release,
3382}; 3382};
3383 3383
3384static struct config_item_type ffs_func_type = { 3384static const struct config_item_type ffs_func_type = {
3385 .ct_item_ops = &ffs_item_ops, 3385 .ct_item_ops = &ffs_item_ops,
3386 .ct_owner = THIS_MODULE, 3386 .ct_owner = THIS_MODULE,
3387}; 3387};
diff --git a/drivers/usb/gadget/function/f_hid.c b/drivers/usb/gadget/function/f_hid.c
index 52576f1b57f1..daae35318a3a 100644
--- a/drivers/usb/gadget/function/f_hid.c
+++ b/drivers/usb/gadget/function/f_hid.c
@@ -988,7 +988,7 @@ static struct configfs_attribute *hid_attrs[] = {
988 NULL, 988 NULL,
989}; 989};
990 990
991static struct config_item_type hid_func_type = { 991static const struct config_item_type hid_func_type = {
992 .ct_item_ops = &hidg_item_ops, 992 .ct_item_ops = &hidg_item_ops,
993 .ct_attrs = hid_attrs, 993 .ct_attrs = hid_attrs,
994 .ct_owner = THIS_MODULE, 994 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c
index ed3b054a0a2e..1803646b3678 100644
--- a/drivers/usb/gadget/function/f_loopback.c
+++ b/drivers/usb/gadget/function/f_loopback.c
@@ -552,7 +552,7 @@ static struct configfs_attribute *lb_attrs[] = {
552 NULL, 552 NULL,
553}; 553};
554 554
555static struct config_item_type lb_func_type = { 555static const struct config_item_type lb_func_type = {
556 .ct_item_ops = &lb_item_ops, 556 .ct_item_ops = &lb_item_ops,
557 .ct_attrs = lb_attrs, 557 .ct_attrs = lb_attrs,
558 .ct_owner = THIS_MODULE, 558 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
index 697224237976..acecd13dcbd9 100644
--- a/drivers/usb/gadget/function/f_mass_storage.c
+++ b/drivers/usb/gadget/function/f_mass_storage.c
@@ -3141,7 +3141,7 @@ static struct configfs_attribute *fsg_lun_attrs[] = {
3141 NULL, 3141 NULL,
3142}; 3142};
3143 3143
3144static struct config_item_type fsg_lun_type = { 3144static const struct config_item_type fsg_lun_type = {
3145 .ct_item_ops = &fsg_lun_item_ops, 3145 .ct_item_ops = &fsg_lun_item_ops,
3146 .ct_attrs = fsg_lun_attrs, 3146 .ct_attrs = fsg_lun_attrs,
3147 .ct_owner = THIS_MODULE, 3147 .ct_owner = THIS_MODULE,
@@ -3332,7 +3332,7 @@ static struct configfs_group_operations fsg_group_ops = {
3332 .drop_item = fsg_lun_drop, 3332 .drop_item = fsg_lun_drop,
3333}; 3333};
3334 3334
3335static struct config_item_type fsg_func_type = { 3335static const struct config_item_type fsg_func_type = {
3336 .ct_item_ops = &fsg_item_ops, 3336 .ct_item_ops = &fsg_item_ops,
3337 .ct_group_ops = &fsg_group_ops, 3337 .ct_group_ops = &fsg_group_ops,
3338 .ct_attrs = fsg_attrs, 3338 .ct_attrs = fsg_attrs,
diff --git a/drivers/usb/gadget/function/f_midi.c b/drivers/usb/gadget/function/f_midi.c
index 5ea713a975c7..4eb96b91cc40 100644
--- a/drivers/usb/gadget/function/f_midi.c
+++ b/drivers/usb/gadget/function/f_midi.c
@@ -1188,7 +1188,7 @@ static struct configfs_attribute *midi_attrs[] = {
1188 NULL, 1188 NULL,
1189}; 1189};
1190 1190
1191static struct config_item_type midi_func_type = { 1191static const struct config_item_type midi_func_type = {
1192 .ct_item_ops = &midi_item_ops, 1192 .ct_item_ops = &midi_item_ops,
1193 .ct_attrs = midi_attrs, 1193 .ct_attrs = midi_attrs,
1194 .ct_owner = THIS_MODULE, 1194 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c
index 87d4e7767f96..c5bce8e22983 100644
--- a/drivers/usb/gadget/function/f_ncm.c
+++ b/drivers/usb/gadget/function/f_ncm.c
@@ -1564,7 +1564,7 @@ static struct configfs_attribute *ncm_attrs[] = {
1564 NULL, 1564 NULL,
1565}; 1565};
1566 1566
1567static struct config_item_type ncm_func_type = { 1567static const struct config_item_type ncm_func_type = {
1568 .ct_item_ops = &ncm_item_ops, 1568 .ct_item_ops = &ncm_item_ops,
1569 .ct_attrs = ncm_attrs, 1569 .ct_attrs = ncm_attrs,
1570 .ct_owner = THIS_MODULE, 1570 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_obex.c b/drivers/usb/gadget/function/f_obex.c
index 082f948aa7fd..55b7f57d2dc7 100644
--- a/drivers/usb/gadget/function/f_obex.c
+++ b/drivers/usb/gadget/function/f_obex.c
@@ -407,7 +407,7 @@ static struct configfs_attribute *acm_attrs[] = {
407 NULL, 407 NULL,
408}; 408};
409 409
410static struct config_item_type obex_func_type = { 410static const struct config_item_type obex_func_type = {
411 .ct_item_ops = &obex_item_ops, 411 .ct_item_ops = &obex_item_ops,
412 .ct_attrs = acm_attrs, 412 .ct_attrs = acm_attrs,
413 .ct_owner = THIS_MODULE, 413 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c
index 2d867b1ffb47..7889bcc0509a 100644
--- a/drivers/usb/gadget/function/f_phonet.c
+++ b/drivers/usb/gadget/function/f_phonet.c
@@ -598,7 +598,7 @@ static struct configfs_attribute *phonet_attrs[] = {
598 NULL, 598 NULL,
599}; 599};
600 600
601static struct config_item_type phonet_func_type = { 601static const struct config_item_type phonet_func_type = {
602 .ct_item_ops = &phonet_item_ops, 602 .ct_item_ops = &phonet_item_ops,
603 .ct_attrs = phonet_attrs, 603 .ct_attrs = phonet_attrs,
604 .ct_owner = THIS_MODULE, 604 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_printer.c b/drivers/usb/gadget/function/f_printer.c
index 587575453f48..dd607b99eb1d 100644
--- a/drivers/usb/gadget/function/f_printer.c
+++ b/drivers/usb/gadget/function/f_printer.c
@@ -1257,7 +1257,7 @@ static struct configfs_attribute *printer_attrs[] = {
1257 NULL, 1257 NULL,
1258}; 1258};
1259 1259
1260static struct config_item_type printer_func_type = { 1260static const struct config_item_type printer_func_type = {
1261 .ct_item_ops = &printer_item_ops, 1261 .ct_item_ops = &printer_item_ops,
1262 .ct_attrs = printer_attrs, 1262 .ct_attrs = printer_attrs,
1263 .ct_owner = THIS_MODULE, 1263 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c
index 9c5bf92c4617..d48df36622b7 100644
--- a/drivers/usb/gadget/function/f_rndis.c
+++ b/drivers/usb/gadget/function/f_rndis.c
@@ -886,7 +886,7 @@ static struct configfs_attribute *rndis_attrs[] = {
886 NULL, 886 NULL,
887}; 887};
888 888
889static struct config_item_type rndis_func_type = { 889static const struct config_item_type rndis_func_type = {
890 .ct_item_ops = &rndis_item_ops, 890 .ct_item_ops = &rndis_item_ops,
891 .ct_attrs = rndis_attrs, 891 .ct_attrs = rndis_attrs,
892 .ct_owner = THIS_MODULE, 892 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_serial.c b/drivers/usb/gadget/function/f_serial.c
index a41fb83e353e..c860f30a0ea2 100644
--- a/drivers/usb/gadget/function/f_serial.c
+++ b/drivers/usb/gadget/function/f_serial.c
@@ -278,7 +278,7 @@ static struct configfs_attribute *acm_attrs[] = {
278 NULL, 278 NULL,
279}; 279};
280 280
281static struct config_item_type serial_func_type = { 281static const struct config_item_type serial_func_type = {
282 .ct_item_ops = &serial_item_ops, 282 .ct_item_ops = &serial_item_ops,
283 .ct_attrs = acm_attrs, 283 .ct_attrs = acm_attrs,
284 .ct_owner = THIS_MODULE, 284 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c
index 39757dd04744..9cdef108fb1b 100644
--- a/drivers/usb/gadget/function/f_sourcesink.c
+++ b/drivers/usb/gadget/function/f_sourcesink.c
@@ -1226,7 +1226,7 @@ static struct configfs_attribute *ss_attrs[] = {
1226 NULL, 1226 NULL,
1227}; 1227};
1228 1228
1229static struct config_item_type ss_func_type = { 1229static const struct config_item_type ss_func_type = {
1230 .ct_item_ops = &ss_item_ops, 1230 .ct_item_ops = &ss_item_ops,
1231 .ct_attrs = ss_attrs, 1231 .ct_attrs = ss_attrs,
1232 .ct_owner = THIS_MODULE, 1232 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_subset.c b/drivers/usb/gadget/function/f_subset.c
index a52d17a69977..4d945254905d 100644
--- a/drivers/usb/gadget/function/f_subset.c
+++ b/drivers/usb/gadget/function/f_subset.c
@@ -408,7 +408,7 @@ static struct configfs_attribute *gether_attrs[] = {
408 NULL, 408 NULL,
409}; 409};
410 410
411static struct config_item_type gether_func_type = { 411static const struct config_item_type gether_func_type = {
412 .ct_item_ops = &gether_item_ops, 412 .ct_item_ops = &gether_item_ops,
413 .ct_attrs = gether_attrs, 413 .ct_attrs = gether_attrs,
414 .ct_owner = THIS_MODULE, 414 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_tcm.c b/drivers/usb/gadget/function/f_tcm.c
index 28cb53de51b8..da81cf16b850 100644
--- a/drivers/usb/gadget/function/f_tcm.c
+++ b/drivers/usb/gadget/function/f_tcm.c
@@ -2167,7 +2167,7 @@ static struct configfs_item_operations tcm_item_ops = {
2167 .release = tcm_attr_release, 2167 .release = tcm_attr_release,
2168}; 2168};
2169 2169
2170static struct config_item_type tcm_func_type = { 2170static const struct config_item_type tcm_func_type = {
2171 .ct_item_ops = &tcm_item_ops, 2171 .ct_item_ops = &tcm_item_ops,
2172 .ct_owner = THIS_MODULE, 2172 .ct_owner = THIS_MODULE,
2173}; 2173};
diff --git a/drivers/usb/gadget/function/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c
index 91e3f3e6bf78..2746a926a8d9 100644
--- a/drivers/usb/gadget/function/f_uac1.c
+++ b/drivers/usb/gadget/function/f_uac1.c
@@ -705,7 +705,7 @@ static struct configfs_attribute *f_uac1_attrs[] = {
705 NULL, 705 NULL,
706}; 706};
707 707
708static struct config_item_type f_uac1_func_type = { 708static const struct config_item_type f_uac1_func_type = {
709 .ct_item_ops = &f_uac1_item_ops, 709 .ct_item_ops = &f_uac1_item_ops,
710 .ct_attrs = f_uac1_attrs, 710 .ct_attrs = f_uac1_attrs,
711 .ct_owner = THIS_MODULE, 711 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_uac1_legacy.c b/drivers/usb/gadget/function/f_uac1_legacy.c
index 8bd6f6e8d24a..04f4b2862256 100644
--- a/drivers/usb/gadget/function/f_uac1_legacy.c
+++ b/drivers/usb/gadget/function/f_uac1_legacy.c
@@ -920,7 +920,7 @@ static struct configfs_attribute *f_uac1_attrs[] = {
920 NULL, 920 NULL,
921}; 921};
922 922
923static struct config_item_type f_uac1_func_type = { 923static const struct config_item_type f_uac1_func_type = {
924 .ct_item_ops = &f_uac1_item_ops, 924 .ct_item_ops = &f_uac1_item_ops,
925 .ct_attrs = f_uac1_attrs, 925 .ct_attrs = f_uac1_attrs,
926 .ct_owner = THIS_MODULE, 926 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c
index 9dc33a70db33..11fe788b4308 100644
--- a/drivers/usb/gadget/function/f_uac2.c
+++ b/drivers/usb/gadget/function/f_uac2.c
@@ -917,7 +917,7 @@ static struct configfs_attribute *f_uac2_attrs[] = {
917 NULL, 917 NULL,
918}; 918};
919 919
920static struct config_item_type f_uac2_func_type = { 920static const struct config_item_type f_uac2_func_type = {
921 .ct_item_ops = &f_uac2_item_ops, 921 .ct_item_ops = &f_uac2_item_ops,
922 .ct_attrs = f_uac2_attrs, 922 .ct_attrs = f_uac2_attrs,
923 .ct_owner = THIS_MODULE, 923 .ct_owner = THIS_MODULE,
diff --git a/drivers/usb/gadget/function/uvc_configfs.c b/drivers/usb/gadget/function/uvc_configfs.c
index d2ad1442769a..c9b8cc4aae5a 100644
--- a/drivers/usb/gadget/function/uvc_configfs.c
+++ b/drivers/usb/gadget/function/uvc_configfs.c
@@ -124,7 +124,7 @@ static struct configfs_attribute *uvcg_control_header_attrs[] = {
124 NULL, 124 NULL,
125}; 125};
126 126
127static struct config_item_type uvcg_control_header_type = { 127static const struct config_item_type uvcg_control_header_type = {
128 .ct_attrs = uvcg_control_header_attrs, 128 .ct_attrs = uvcg_control_header_attrs,
129 .ct_owner = THIS_MODULE, 129 .ct_owner = THIS_MODULE,
130}; 130};
@@ -167,7 +167,7 @@ static struct configfs_group_operations uvcg_control_header_grp_ops = {
167 .drop_item = uvcg_control_header_drop, 167 .drop_item = uvcg_control_header_drop,
168}; 168};
169 169
170static struct config_item_type uvcg_control_header_grp_type = { 170static const struct config_item_type uvcg_control_header_grp_type = {
171 .ct_group_ops = &uvcg_control_header_grp_ops, 171 .ct_group_ops = &uvcg_control_header_grp_ops,
172 .ct_owner = THIS_MODULE, 172 .ct_owner = THIS_MODULE,
173}; 173};
@@ -262,7 +262,7 @@ static struct configfs_attribute *uvcg_default_processing_attrs[] = {
262 NULL, 262 NULL,
263}; 263};
264 264
265static struct config_item_type uvcg_default_processing_type = { 265static const struct config_item_type uvcg_default_processing_type = {
266 .ct_attrs = uvcg_default_processing_attrs, 266 .ct_attrs = uvcg_default_processing_attrs,
267 .ct_owner = THIS_MODULE, 267 .ct_owner = THIS_MODULE,
268}; 268};
@@ -274,7 +274,7 @@ static struct uvcg_processing_grp {
274 struct config_group group; 274 struct config_group group;
275} uvcg_processing_grp; 275} uvcg_processing_grp;
276 276
277static struct config_item_type uvcg_processing_grp_type = { 277static const struct config_item_type uvcg_processing_grp_type = {
278 .ct_owner = THIS_MODULE, 278 .ct_owner = THIS_MODULE,
279}; 279};
280 280
@@ -379,7 +379,7 @@ static struct configfs_attribute *uvcg_default_camera_attrs[] = {
379 NULL, 379 NULL,
380}; 380};
381 381
382static struct config_item_type uvcg_default_camera_type = { 382static const struct config_item_type uvcg_default_camera_type = {
383 .ct_attrs = uvcg_default_camera_attrs, 383 .ct_attrs = uvcg_default_camera_attrs,
384 .ct_owner = THIS_MODULE, 384 .ct_owner = THIS_MODULE,
385}; 385};
@@ -391,7 +391,7 @@ static struct uvcg_camera_grp {
391 struct config_group group; 391 struct config_group group;
392} uvcg_camera_grp; 392} uvcg_camera_grp;
393 393
394static struct config_item_type uvcg_camera_grp_type = { 394static const struct config_item_type uvcg_camera_grp_type = {
395 .ct_owner = THIS_MODULE, 395 .ct_owner = THIS_MODULE,
396}; 396};
397 397
@@ -457,7 +457,7 @@ static struct configfs_attribute *uvcg_default_output_attrs[] = {
457 NULL, 457 NULL,
458}; 458};
459 459
460static struct config_item_type uvcg_default_output_type = { 460static const struct config_item_type uvcg_default_output_type = {
461 .ct_attrs = uvcg_default_output_attrs, 461 .ct_attrs = uvcg_default_output_attrs,
462 .ct_owner = THIS_MODULE, 462 .ct_owner = THIS_MODULE,
463}; 463};
@@ -469,7 +469,7 @@ static struct uvcg_output_grp {
469 struct config_group group; 469 struct config_group group;
470} uvcg_output_grp; 470} uvcg_output_grp;
471 471
472static struct config_item_type uvcg_output_grp_type = { 472static const struct config_item_type uvcg_output_grp_type = {
473 .ct_owner = THIS_MODULE, 473 .ct_owner = THIS_MODULE,
474}; 474};
475 475
@@ -478,7 +478,7 @@ static struct uvcg_terminal_grp {
478 struct config_group group; 478 struct config_group group;
479} uvcg_terminal_grp; 479} uvcg_terminal_grp;
480 480
481static struct config_item_type uvcg_terminal_grp_type = { 481static const struct config_item_type uvcg_terminal_grp_type = {
482 .ct_owner = THIS_MODULE, 482 .ct_owner = THIS_MODULE,
483}; 483};
484 484
@@ -583,7 +583,7 @@ static struct configfs_item_operations uvcg_control_class_item_ops = {
583 .drop_link = uvcg_control_class_drop_link, 583 .drop_link = uvcg_control_class_drop_link,
584}; 584};
585 585
586static struct config_item_type uvcg_control_class_type = { 586static const struct config_item_type uvcg_control_class_type = {
587 .ct_item_ops = &uvcg_control_class_item_ops, 587 .ct_item_ops = &uvcg_control_class_item_ops,
588 .ct_owner = THIS_MODULE, 588 .ct_owner = THIS_MODULE,
589}; 589};
@@ -593,7 +593,7 @@ static struct uvcg_control_class_grp {
593 struct config_group group; 593 struct config_group group;
594} uvcg_control_class_grp; 594} uvcg_control_class_grp;
595 595
596static struct config_item_type uvcg_control_class_grp_type = { 596static const struct config_item_type uvcg_control_class_grp_type = {
597 .ct_owner = THIS_MODULE, 597 .ct_owner = THIS_MODULE,
598}; 598};
599 599
@@ -602,7 +602,7 @@ static struct uvcg_control_grp {
602 struct config_group group; 602 struct config_group group;
603} uvcg_control_grp; 603} uvcg_control_grp;
604 604
605static struct config_item_type uvcg_control_grp_type = { 605static const struct config_item_type uvcg_control_grp_type = {
606 .ct_owner = THIS_MODULE, 606 .ct_owner = THIS_MODULE,
607}; 607};
608 608
@@ -854,7 +854,7 @@ static struct configfs_attribute *uvcg_streaming_header_attrs[] = {
854 NULL, 854 NULL,
855}; 855};
856 856
857static struct config_item_type uvcg_streaming_header_type = { 857static const struct config_item_type uvcg_streaming_header_type = {
858 .ct_item_ops = &uvcg_streaming_header_item_ops, 858 .ct_item_ops = &uvcg_streaming_header_item_ops,
859 .ct_attrs = uvcg_streaming_header_attrs, 859 .ct_attrs = uvcg_streaming_header_attrs,
860 .ct_owner = THIS_MODULE, 860 .ct_owner = THIS_MODULE,
@@ -898,7 +898,7 @@ static struct configfs_group_operations uvcg_streaming_header_grp_ops = {
898 .drop_item = uvcg_streaming_header_drop, 898 .drop_item = uvcg_streaming_header_drop,
899}; 899};
900 900
901static struct config_item_type uvcg_streaming_header_grp_type = { 901static const struct config_item_type uvcg_streaming_header_grp_type = {
902 .ct_group_ops = &uvcg_streaming_header_grp_ops, 902 .ct_group_ops = &uvcg_streaming_header_grp_ops,
903 .ct_owner = THIS_MODULE, 903 .ct_owner = THIS_MODULE,
904}; 904};
@@ -1147,7 +1147,7 @@ static struct configfs_attribute *uvcg_frame_attrs[] = {
1147 NULL, 1147 NULL,
1148}; 1148};
1149 1149
1150static struct config_item_type uvcg_frame_type = { 1150static const struct config_item_type uvcg_frame_type = {
1151 .ct_attrs = uvcg_frame_attrs, 1151 .ct_attrs = uvcg_frame_attrs,
1152 .ct_owner = THIS_MODULE, 1152 .ct_owner = THIS_MODULE,
1153}; 1153};
@@ -1416,7 +1416,7 @@ static struct configfs_attribute *uvcg_uncompressed_attrs[] = {
1416 NULL, 1416 NULL,
1417}; 1417};
1418 1418
1419static struct config_item_type uvcg_uncompressed_type = { 1419static const struct config_item_type uvcg_uncompressed_type = {
1420 .ct_group_ops = &uvcg_uncompressed_group_ops, 1420 .ct_group_ops = &uvcg_uncompressed_group_ops,
1421 .ct_attrs = uvcg_uncompressed_attrs, 1421 .ct_attrs = uvcg_uncompressed_attrs,
1422 .ct_owner = THIS_MODULE, 1422 .ct_owner = THIS_MODULE,
@@ -1466,7 +1466,7 @@ static struct configfs_group_operations uvcg_uncompressed_grp_ops = {
1466 .drop_item = uvcg_uncompressed_drop, 1466 .drop_item = uvcg_uncompressed_drop,
1467}; 1467};
1468 1468
1469static struct config_item_type uvcg_uncompressed_grp_type = { 1469static const struct config_item_type uvcg_uncompressed_grp_type = {
1470 .ct_group_ops = &uvcg_uncompressed_grp_ops, 1470 .ct_group_ops = &uvcg_uncompressed_grp_ops,
1471 .ct_owner = THIS_MODULE, 1471 .ct_owner = THIS_MODULE,
1472}; 1472};
@@ -1616,7 +1616,7 @@ static struct configfs_attribute *uvcg_mjpeg_attrs[] = {
1616 NULL, 1616 NULL,
1617}; 1617};
1618 1618
1619static struct config_item_type uvcg_mjpeg_type = { 1619static const struct config_item_type uvcg_mjpeg_type = {
1620 .ct_group_ops = &uvcg_mjpeg_group_ops, 1620 .ct_group_ops = &uvcg_mjpeg_group_ops,
1621 .ct_attrs = uvcg_mjpeg_attrs, 1621 .ct_attrs = uvcg_mjpeg_attrs,
1622 .ct_owner = THIS_MODULE, 1622 .ct_owner = THIS_MODULE,
@@ -1660,7 +1660,7 @@ static struct configfs_group_operations uvcg_mjpeg_grp_ops = {
1660 .drop_item = uvcg_mjpeg_drop, 1660 .drop_item = uvcg_mjpeg_drop,
1661}; 1661};
1662 1662
1663static struct config_item_type uvcg_mjpeg_grp_type = { 1663static const struct config_item_type uvcg_mjpeg_grp_type = {
1664 .ct_group_ops = &uvcg_mjpeg_grp_ops, 1664 .ct_group_ops = &uvcg_mjpeg_grp_ops,
1665 .ct_owner = THIS_MODULE, 1665 .ct_owner = THIS_MODULE,
1666}; 1666};
@@ -1725,7 +1725,7 @@ static struct configfs_attribute *uvcg_default_color_matching_attrs[] = {
1725 NULL, 1725 NULL,
1726}; 1726};
1727 1727
1728static struct config_item_type uvcg_default_color_matching_type = { 1728static const struct config_item_type uvcg_default_color_matching_type = {
1729 .ct_attrs = uvcg_default_color_matching_attrs, 1729 .ct_attrs = uvcg_default_color_matching_attrs,
1730 .ct_owner = THIS_MODULE, 1730 .ct_owner = THIS_MODULE,
1731}; 1731};
@@ -1737,7 +1737,7 @@ static struct uvcg_color_matching_grp {
1737 struct config_group group; 1737 struct config_group group;
1738} uvcg_color_matching_grp; 1738} uvcg_color_matching_grp;
1739 1739
1740static struct config_item_type uvcg_color_matching_grp_type = { 1740static const struct config_item_type uvcg_color_matching_grp_type = {
1741 .ct_owner = THIS_MODULE, 1741 .ct_owner = THIS_MODULE,
1742}; 1742};
1743 1743
@@ -2082,7 +2082,7 @@ static struct configfs_item_operations uvcg_streaming_class_item_ops = {
2082 .drop_link = uvcg_streaming_class_drop_link, 2082 .drop_link = uvcg_streaming_class_drop_link,
2083}; 2083};
2084 2084
2085static struct config_item_type uvcg_streaming_class_type = { 2085static const struct config_item_type uvcg_streaming_class_type = {
2086 .ct_item_ops = &uvcg_streaming_class_item_ops, 2086 .ct_item_ops = &uvcg_streaming_class_item_ops,
2087 .ct_owner = THIS_MODULE, 2087 .ct_owner = THIS_MODULE,
2088}; 2088};
@@ -2092,7 +2092,7 @@ static struct uvcg_streaming_class_grp {
2092 struct config_group group; 2092 struct config_group group;
2093} uvcg_streaming_class_grp; 2093} uvcg_streaming_class_grp;
2094 2094
2095static struct config_item_type uvcg_streaming_class_grp_type = { 2095static const struct config_item_type uvcg_streaming_class_grp_type = {
2096 .ct_owner = THIS_MODULE, 2096 .ct_owner = THIS_MODULE,
2097}; 2097};
2098 2098
@@ -2101,7 +2101,7 @@ static struct uvcg_streaming_grp {
2101 struct config_group group; 2101 struct config_group group;
2102} uvcg_streaming_grp; 2102} uvcg_streaming_grp;
2103 2103
2104static struct config_item_type uvcg_streaming_grp_type = { 2104static const struct config_item_type uvcg_streaming_grp_type = {
2105 .ct_owner = THIS_MODULE, 2105 .ct_owner = THIS_MODULE,
2106}; 2106};
2107 2107
@@ -2187,7 +2187,7 @@ static struct configfs_attribute *uvc_attrs[] = {
2187 NULL, 2187 NULL,
2188}; 2188};
2189 2189
2190static struct config_item_type uvc_func_type = { 2190static const struct config_item_type uvc_func_type = {
2191 .ct_item_ops = &uvc_item_ops, 2191 .ct_item_ops = &uvc_item_ops,
2192 .ct_attrs = uvc_attrs, 2192 .ct_attrs = uvc_attrs,
2193 .ct_owner = THIS_MODULE, 2193 .ct_owner = THIS_MODULE,
diff --git a/fs/configfs/dir.c b/fs/configfs/dir.c
index 56fb26127fef..577cff24707b 100644
--- a/fs/configfs/dir.c
+++ b/fs/configfs/dir.c
@@ -584,7 +584,7 @@ static void detach_attrs(struct config_item * item)
584 584
585static int populate_attrs(struct config_item *item) 585static int populate_attrs(struct config_item *item)
586{ 586{
587 struct config_item_type *t = item->ci_type; 587 const struct config_item_type *t = item->ci_type;
588 struct configfs_attribute *attr; 588 struct configfs_attribute *attr;
589 struct configfs_bin_attribute *bin_attr; 589 struct configfs_bin_attribute *bin_attr;
590 int error = 0; 590 int error = 0;
@@ -901,7 +901,7 @@ static void configfs_detach_group(struct config_item *item)
901static void client_disconnect_notify(struct config_item *parent_item, 901static void client_disconnect_notify(struct config_item *parent_item,
902 struct config_item *item) 902 struct config_item *item)
903{ 903{
904 struct config_item_type *type; 904 const struct config_item_type *type;
905 905
906 type = parent_item->ci_type; 906 type = parent_item->ci_type;
907 BUG_ON(!type); 907 BUG_ON(!type);
@@ -920,7 +920,7 @@ static void client_disconnect_notify(struct config_item *parent_item,
920static void client_drop_item(struct config_item *parent_item, 920static void client_drop_item(struct config_item *parent_item,
921 struct config_item *item) 921 struct config_item *item)
922{ 922{
923 struct config_item_type *type; 923 const struct config_item_type *type;
924 924
925 type = parent_item->ci_type; 925 type = parent_item->ci_type;
926 BUG_ON(!type); 926 BUG_ON(!type);
@@ -1260,7 +1260,7 @@ static int configfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode
1260 struct config_item *parent_item; 1260 struct config_item *parent_item;
1261 struct configfs_subsystem *subsys; 1261 struct configfs_subsystem *subsys;
1262 struct configfs_dirent *sd; 1262 struct configfs_dirent *sd;
1263 struct config_item_type *type; 1263 const struct config_item_type *type;
1264 struct module *subsys_owner = NULL, *new_item_owner = NULL; 1264 struct module *subsys_owner = NULL, *new_item_owner = NULL;
1265 char *name; 1265 char *name;
1266 1266
@@ -1810,7 +1810,7 @@ EXPORT_SYMBOL(configfs_unregister_group);
1810struct config_group * 1810struct config_group *
1811configfs_register_default_group(struct config_group *parent_group, 1811configfs_register_default_group(struct config_group *parent_group,
1812 const char *name, 1812 const char *name,
1813 struct config_item_type *item_type) 1813 const struct config_item_type *item_type)
1814{ 1814{
1815 int ret; 1815 int ret;
1816 struct config_group *group; 1816 struct config_group *group;
diff --git a/fs/configfs/file.c b/fs/configfs/file.c
index 39da1103d341..62580dba3552 100644
--- a/fs/configfs/file.c
+++ b/fs/configfs/file.c
@@ -166,7 +166,7 @@ configfs_read_bin_file(struct file *file, char __user *buf,
166 retval = -ETXTBSY; 166 retval = -ETXTBSY;
167 goto out; 167 goto out;
168 } 168 }
169 buffer->read_in_progress = 1; 169 buffer->read_in_progress = true;
170 170
171 if (buffer->needs_read_fill) { 171 if (buffer->needs_read_fill) {
172 /* perform first read with buf == NULL to get extent */ 172 /* perform first read with buf == NULL to get extent */
@@ -325,7 +325,7 @@ configfs_write_bin_file(struct file *file, const char __user *buf,
325 len = -ETXTBSY; 325 len = -ETXTBSY;
326 goto out; 326 goto out;
327 } 327 }
328 buffer->write_in_progress = 1; 328 buffer->write_in_progress = true;
329 329
330 /* buffer grows? */ 330 /* buffer grows? */
331 if (*ppos + count > buffer->bin_buffer_size) { 331 if (*ppos + count > buffer->bin_buffer_size) {
@@ -429,8 +429,8 @@ static int check_perm(struct inode * inode, struct file * file, int type)
429 } 429 }
430 mutex_init(&buffer->mutex); 430 mutex_init(&buffer->mutex);
431 buffer->needs_read_fill = 1; 431 buffer->needs_read_fill = 1;
432 buffer->read_in_progress = 0; 432 buffer->read_in_progress = false;
433 buffer->write_in_progress = 0; 433 buffer->write_in_progress = false;
434 buffer->ops = ops; 434 buffer->ops = ops;
435 file->private_data = buffer; 435 file->private_data = buffer;
436 goto Done; 436 goto Done;
@@ -488,10 +488,10 @@ static int configfs_release_bin_file(struct inode *inode, struct file *filp)
488 ssize_t len = 0; 488 ssize_t len = 0;
489 int ret; 489 int ret;
490 490
491 buffer->read_in_progress = 0; 491 buffer->read_in_progress = false;
492 492
493 if (buffer->write_in_progress) { 493 if (buffer->write_in_progress) {
494 buffer->write_in_progress = 0; 494 buffer->write_in_progress = false;
495 495
496 len = bin_attr->write(item, buffer->bin_buffer, 496 len = bin_attr->write(item, buffer->bin_buffer,
497 buffer->bin_buffer_size); 497 buffer->bin_buffer_size);
diff --git a/fs/configfs/item.c b/fs/configfs/item.c
index a66f6624d899..88f266efc09b 100644
--- a/fs/configfs/item.c
+++ b/fs/configfs/item.c
@@ -113,7 +113,7 @@ EXPORT_SYMBOL(config_item_set_name);
113 113
114void config_item_init_type_name(struct config_item *item, 114void config_item_init_type_name(struct config_item *item,
115 const char *name, 115 const char *name,
116 struct config_item_type *type) 116 const struct config_item_type *type)
117{ 117{
118 config_item_set_name(item, "%s", name); 118 config_item_set_name(item, "%s", name);
119 item->ci_type = type; 119 item->ci_type = type;
@@ -122,7 +122,7 @@ void config_item_init_type_name(struct config_item *item,
122EXPORT_SYMBOL(config_item_init_type_name); 122EXPORT_SYMBOL(config_item_init_type_name);
123 123
124void config_group_init_type_name(struct config_group *group, const char *name, 124void config_group_init_type_name(struct config_group *group, const char *name,
125 struct config_item_type *type) 125 const struct config_item_type *type)
126{ 126{
127 config_item_set_name(&group->cg_item, "%s", name); 127 config_item_set_name(&group->cg_item, "%s", name);
128 group->cg_item.ci_type = type; 128 group->cg_item.ci_type = type;
@@ -148,7 +148,7 @@ EXPORT_SYMBOL(config_item_get_unless_zero);
148 148
149static void config_item_cleanup(struct config_item *item) 149static void config_item_cleanup(struct config_item *item)
150{ 150{
151 struct config_item_type *t = item->ci_type; 151 const struct config_item_type *t = item->ci_type;
152 struct config_group *s = item->ci_group; 152 struct config_group *s = item->ci_group;
153 struct config_item *parent = item->ci_parent; 153 struct config_item *parent = item->ci_parent;
154 154
diff --git a/fs/configfs/symlink.c b/fs/configfs/symlink.c
index c8aabba502f6..78ffc2699993 100644
--- a/fs/configfs/symlink.c
+++ b/fs/configfs/symlink.c
@@ -138,7 +138,7 @@ int configfs_symlink(struct inode *dir, struct dentry *dentry, const char *symna
138 struct configfs_dirent *sd; 138 struct configfs_dirent *sd;
139 struct config_item *parent_item; 139 struct config_item *parent_item;
140 struct config_item *target_item = NULL; 140 struct config_item *target_item = NULL;
141 struct config_item_type *type; 141 const struct config_item_type *type;
142 142
143 sd = dentry->d_parent->d_fsdata; 143 sd = dentry->d_parent->d_fsdata;
144 /* 144 /*
@@ -186,7 +186,7 @@ int configfs_unlink(struct inode *dir, struct dentry *dentry)
186 struct configfs_dirent *sd = dentry->d_fsdata; 186 struct configfs_dirent *sd = dentry->d_fsdata;
187 struct configfs_symlink *sl; 187 struct configfs_symlink *sl;
188 struct config_item *parent_item; 188 struct config_item *parent_item;
189 struct config_item_type *type; 189 const struct config_item_type *type;
190 int ret; 190 int ret;
191 191
192 ret = -EPERM; /* What lack-of-symlink returns */ 192 ret = -EPERM; /* What lack-of-symlink returns */
diff --git a/fs/dlm/config.c b/fs/dlm/config.c
index 7211e826d90d..1270551d24e3 100644
--- a/fs/dlm/config.c
+++ b/fs/dlm/config.c
@@ -282,44 +282,44 @@ static struct configfs_item_operations node_ops = {
282 .release = release_node, 282 .release = release_node,
283}; 283};
284 284
285static struct config_item_type clusters_type = { 285static const struct config_item_type clusters_type = {
286 .ct_group_ops = &clusters_ops, 286 .ct_group_ops = &clusters_ops,
287 .ct_owner = THIS_MODULE, 287 .ct_owner = THIS_MODULE,
288}; 288};
289 289
290static struct config_item_type cluster_type = { 290static const struct config_item_type cluster_type = {
291 .ct_item_ops = &cluster_ops, 291 .ct_item_ops = &cluster_ops,
292 .ct_attrs = cluster_attrs, 292 .ct_attrs = cluster_attrs,
293 .ct_owner = THIS_MODULE, 293 .ct_owner = THIS_MODULE,
294}; 294};
295 295
296static struct config_item_type spaces_type = { 296static const struct config_item_type spaces_type = {
297 .ct_group_ops = &spaces_ops, 297 .ct_group_ops = &spaces_ops,
298 .ct_owner = THIS_MODULE, 298 .ct_owner = THIS_MODULE,
299}; 299};
300 300
301static struct config_item_type space_type = { 301static const struct config_item_type space_type = {
302 .ct_item_ops = &space_ops, 302 .ct_item_ops = &space_ops,
303 .ct_owner = THIS_MODULE, 303 .ct_owner = THIS_MODULE,
304}; 304};
305 305
306static struct config_item_type comms_type = { 306static const struct config_item_type comms_type = {
307 .ct_group_ops = &comms_ops, 307 .ct_group_ops = &comms_ops,
308 .ct_owner = THIS_MODULE, 308 .ct_owner = THIS_MODULE,
309}; 309};
310 310
311static struct config_item_type comm_type = { 311static const struct config_item_type comm_type = {
312 .ct_item_ops = &comm_ops, 312 .ct_item_ops = &comm_ops,
313 .ct_attrs = comm_attrs, 313 .ct_attrs = comm_attrs,
314 .ct_owner = THIS_MODULE, 314 .ct_owner = THIS_MODULE,
315}; 315};
316 316
317static struct config_item_type nodes_type = { 317static const struct config_item_type nodes_type = {
318 .ct_group_ops = &nodes_ops, 318 .ct_group_ops = &nodes_ops,
319 .ct_owner = THIS_MODULE, 319 .ct_owner = THIS_MODULE,
320}; 320};
321 321
322static struct config_item_type node_type = { 322static const struct config_item_type node_type = {
323 .ct_item_ops = &node_ops, 323 .ct_item_ops = &node_ops,
324 .ct_attrs = node_attrs, 324 .ct_attrs = node_attrs,
325 .ct_owner = THIS_MODULE, 325 .ct_owner = THIS_MODULE,
diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c
index d0206042d068..ea8c551bcd7e 100644
--- a/fs/ocfs2/cluster/heartbeat.c
+++ b/fs/ocfs2/cluster/heartbeat.c
@@ -2025,7 +2025,7 @@ static struct configfs_item_operations o2hb_region_item_ops = {
2025 .release = o2hb_region_release, 2025 .release = o2hb_region_release,
2026}; 2026};
2027 2027
2028static struct config_item_type o2hb_region_type = { 2028static const struct config_item_type o2hb_region_type = {
2029 .ct_item_ops = &o2hb_region_item_ops, 2029 .ct_item_ops = &o2hb_region_item_ops,
2030 .ct_attrs = o2hb_region_attrs, 2030 .ct_attrs = o2hb_region_attrs,
2031 .ct_owner = THIS_MODULE, 2031 .ct_owner = THIS_MODULE,
@@ -2310,7 +2310,7 @@ static struct configfs_group_operations o2hb_heartbeat_group_group_ops = {
2310 .drop_item = o2hb_heartbeat_group_drop_item, 2310 .drop_item = o2hb_heartbeat_group_drop_item,
2311}; 2311};
2312 2312
2313static struct config_item_type o2hb_heartbeat_group_type = { 2313static const struct config_item_type o2hb_heartbeat_group_type = {
2314 .ct_group_ops = &o2hb_heartbeat_group_group_ops, 2314 .ct_group_ops = &o2hb_heartbeat_group_group_ops,
2315 .ct_attrs = o2hb_heartbeat_group_attrs, 2315 .ct_attrs = o2hb_heartbeat_group_attrs,
2316 .ct_owner = THIS_MODULE, 2316 .ct_owner = THIS_MODULE,
diff --git a/fs/ocfs2/cluster/nodemanager.c b/fs/ocfs2/cluster/nodemanager.c
index b17d180bdc16..a51200ece93d 100644
--- a/fs/ocfs2/cluster/nodemanager.c
+++ b/fs/ocfs2/cluster/nodemanager.c
@@ -378,7 +378,7 @@ static struct configfs_item_operations o2nm_node_item_ops = {
378 .release = o2nm_node_release, 378 .release = o2nm_node_release,
379}; 379};
380 380
381static struct config_item_type o2nm_node_type = { 381static const struct config_item_type o2nm_node_type = {
382 .ct_item_ops = &o2nm_node_item_ops, 382 .ct_item_ops = &o2nm_node_item_ops,
383 .ct_attrs = o2nm_node_attrs, 383 .ct_attrs = o2nm_node_attrs,
384 .ct_owner = THIS_MODULE, 384 .ct_owner = THIS_MODULE,
@@ -619,7 +619,7 @@ static struct configfs_group_operations o2nm_node_group_group_ops = {
619 .drop_item = o2nm_node_group_drop_item, 619 .drop_item = o2nm_node_group_drop_item,
620}; 620};
621 621
622static struct config_item_type o2nm_node_group_type = { 622static const struct config_item_type o2nm_node_group_type = {
623 .ct_group_ops = &o2nm_node_group_group_ops, 623 .ct_group_ops = &o2nm_node_group_group_ops,
624 .ct_owner = THIS_MODULE, 624 .ct_owner = THIS_MODULE,
625}; 625};
@@ -637,7 +637,7 @@ static struct configfs_item_operations o2nm_cluster_item_ops = {
637 .release = o2nm_cluster_release, 637 .release = o2nm_cluster_release,
638}; 638};
639 639
640static struct config_item_type o2nm_cluster_type = { 640static const struct config_item_type o2nm_cluster_type = {
641 .ct_item_ops = &o2nm_cluster_item_ops, 641 .ct_item_ops = &o2nm_cluster_item_ops,
642 .ct_attrs = o2nm_cluster_attrs, 642 .ct_attrs = o2nm_cluster_attrs,
643 .ct_owner = THIS_MODULE, 643 .ct_owner = THIS_MODULE,
@@ -722,7 +722,7 @@ static struct configfs_group_operations o2nm_cluster_group_group_ops = {
722 .drop_item = o2nm_cluster_group_drop_item, 722 .drop_item = o2nm_cluster_group_drop_item,
723}; 723};
724 724
725static struct config_item_type o2nm_cluster_group_type = { 725static const struct config_item_type o2nm_cluster_group_type = {
726 .ct_group_ops = &o2nm_cluster_group_group_ops, 726 .ct_group_ops = &o2nm_cluster_group_group_ops,
727 .ct_owner = THIS_MODULE, 727 .ct_owner = THIS_MODULE,
728}; 728};
diff --git a/include/linux/configfs.h b/include/linux/configfs.h
index c96709049683..90b90f8baf99 100644
--- a/include/linux/configfs.h
+++ b/include/linux/configfs.h
@@ -58,7 +58,7 @@ struct config_item {
58 struct list_head ci_entry; 58 struct list_head ci_entry;
59 struct config_item *ci_parent; 59 struct config_item *ci_parent;
60 struct config_group *ci_group; 60 struct config_group *ci_group;
61 struct config_item_type *ci_type; 61 const struct config_item_type *ci_type;
62 struct dentry *ci_dentry; 62 struct dentry *ci_dentry;
63}; 63};
64 64
@@ -72,7 +72,7 @@ static inline char *config_item_name(struct config_item * item)
72 72
73extern void config_item_init_type_name(struct config_item *item, 73extern void config_item_init_type_name(struct config_item *item,
74 const char *name, 74 const char *name,
75 struct config_item_type *type); 75 const struct config_item_type *type);
76 76
77extern struct config_item *config_item_get(struct config_item *); 77extern struct config_item *config_item_get(struct config_item *);
78extern struct config_item *config_item_get_unless_zero(struct config_item *); 78extern struct config_item *config_item_get_unless_zero(struct config_item *);
@@ -101,7 +101,7 @@ struct config_group {
101extern void config_group_init(struct config_group *group); 101extern void config_group_init(struct config_group *group);
102extern void config_group_init_type_name(struct config_group *group, 102extern void config_group_init_type_name(struct config_group *group,
103 const char *name, 103 const char *name,
104 struct config_item_type *type); 104 const struct config_item_type *type);
105 105
106static inline struct config_group *to_config_group(struct config_item *item) 106static inline struct config_group *to_config_group(struct config_item *item)
107{ 107{
@@ -261,7 +261,7 @@ void configfs_remove_default_groups(struct config_group *group);
261struct config_group * 261struct config_group *
262configfs_register_default_group(struct config_group *parent_group, 262configfs_register_default_group(struct config_group *parent_group,
263 const char *name, 263 const char *name,
264 struct config_item_type *item_type); 264 const struct config_item_type *item_type);
265void configfs_unregister_default_group(struct config_group *group); 265void configfs_unregister_default_group(struct config_group *group);
266 266
267/* These functions can sleep and can alloc with GFP_KERNEL */ 267/* These functions can sleep and can alloc with GFP_KERNEL */
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);
60static inline 60static inline
61void iio_swd_group_init_type_name(struct iio_sw_device *d, 61void iio_swd_group_init_type_name(struct iio_sw_device *d,
62 const char *name, 62 const char *name,
63 struct config_item_type *type) 63 const struct config_item_type *type)
64{ 64{
65#if IS_ENABLED(CONFIG_CONFIGFS_FS) 65#if IS_ENABLED(CONFIG_CONFIGFS_FS)
66 config_group_init_type_name(&d->group, name, type); 66 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);
60static inline 60static inline
61void iio_swt_group_init_type_name(struct iio_sw_trigger *t, 61void iio_swt_group_init_type_name(struct iio_sw_trigger *t,
62 const char *name, 62 const char *name,
63 struct config_item_type *type) 63 const struct config_item_type *type)
64{ 64{
65#if IS_ENABLED(CONFIG_CONFIGFS_FS) 65#if IS_ENABLED(CONFIG_CONFIGFS_FS)
66 config_group_init_type_name(&t->group, name, type); 66 config_group_init_type_name(&t->group, name, type);
diff --git a/include/target/iscsi/iscsi_target_stat.h b/include/target/iscsi/iscsi_target_stat.h
index b77d579e3ecf..4d75a2c426ca 100644
--- a/include/target/iscsi/iscsi_target_stat.h
+++ b/include/target/iscsi/iscsi_target_stat.h
@@ -9,16 +9,16 @@
9/* 9/*
10 * For struct iscsi_tiqn->tiqn_wwn default groups 10 * For struct iscsi_tiqn->tiqn_wwn default groups
11 */ 11 */
12extern struct config_item_type iscsi_stat_instance_cit; 12extern const struct config_item_type iscsi_stat_instance_cit;
13extern struct config_item_type iscsi_stat_sess_err_cit; 13extern const struct config_item_type iscsi_stat_sess_err_cit;
14extern struct config_item_type iscsi_stat_tgt_attr_cit; 14extern const struct config_item_type iscsi_stat_tgt_attr_cit;
15extern struct config_item_type iscsi_stat_login_cit; 15extern const struct config_item_type iscsi_stat_login_cit;
16extern struct config_item_type iscsi_stat_logout_cit; 16extern const struct config_item_type iscsi_stat_logout_cit;
17 17
18/* 18/*
19 * For struct iscsi_session->se_sess default groups 19 * For struct iscsi_session->se_sess default groups
20 */ 20 */
21extern struct config_item_type iscsi_stat_sess_cit; 21extern const struct config_item_type iscsi_stat_sess_cit;
22 22
23/* iSCSI session error types */ 23/* iSCSI session error types */
24#define ISCSI_SESS_ERR_UNKNOWN 0 24#define ISCSI_SESS_ERR_UNKNOWN 0
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,