]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
usb: gadget: make config_item_type structures const
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 16 Oct 2017 15:18:41 +0000 (17:18 +0200)
committerChristoph Hellwig <hch@lst.de>
Thu, 19 Oct 2017 14:15:23 +0000 (16:15 +0200)
Make these structures const as they are only passed to the const
argument of the functions config_{group/item}_init_type_name.

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>
21 files changed:
drivers/usb/gadget/function/f_acm.c
drivers/usb/gadget/function/f_ecm.c
drivers/usb/gadget/function/f_eem.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/function/f_hid.c
drivers/usb/gadget/function/f_loopback.c
drivers/usb/gadget/function/f_mass_storage.c
drivers/usb/gadget/function/f_midi.c
drivers/usb/gadget/function/f_ncm.c
drivers/usb/gadget/function/f_obex.c
drivers/usb/gadget/function/f_phonet.c
drivers/usb/gadget/function/f_printer.c
drivers/usb/gadget/function/f_rndis.c
drivers/usb/gadget/function/f_serial.c
drivers/usb/gadget/function/f_sourcesink.c
drivers/usb/gadget/function/f_subset.c
drivers/usb/gadget/function/f_tcm.c
drivers/usb/gadget/function/f_uac1.c
drivers/usb/gadget/function/f_uac1_legacy.c
drivers/usb/gadget/function/f_uac2.c
drivers/usb/gadget/function/uvc_configfs.c

index 5e3828d9dac7f3af922456d141191ddd0733bbaf..8680af4ab66713f80f4f49dcd3a100471388d113 100644 (file)
@@ -786,7 +786,7 @@ static struct configfs_attribute *acm_attrs[] = {
        NULL,
 };
 
-static struct config_item_type acm_func_type = {
+static const struct config_item_type acm_func_type = {
        .ct_item_ops    = &acm_item_ops,
        .ct_attrs       = acm_attrs,
        .ct_owner       = THIS_MODULE,
index 4c488d15b6f6e082eaa6c3f16a78a8f684a38762..9657e193d734e18681d103a633f0dbdc716e5cc5 100644 (file)
@@ -845,7 +845,7 @@ static struct configfs_attribute *ecm_attrs[] = {
        NULL,
 };
 
-static struct config_item_type ecm_func_type = {
+static const struct config_item_type ecm_func_type = {
        .ct_item_ops    = &ecm_item_ops,
        .ct_attrs       = ecm_attrs,
        .ct_owner       = THIS_MODULE,
index 007ec6e4a5d42cf391060b3e99b36b8bf3ff2848..5e5d1645c32ae37ee7d0caa74496fdcdf0584803 100644 (file)
@@ -556,7 +556,7 @@ static struct configfs_attribute *eem_attrs[] = {
        NULL,
 };
 
-static struct config_item_type eem_func_type = {
+static const struct config_item_type eem_func_type = {
        .ct_item_ops    = &eem_item_ops,
        .ct_attrs       = eem_attrs,
        .ct_owner       = THIS_MODULE,
index 8b342587f8ad6eb3d79d25d602b741592ec911ab..5362fc42ffc3c6b00a9e8590b321710de2aa7418 100644 (file)
@@ -3385,7 +3385,7 @@ static struct configfs_item_operations ffs_item_ops = {
        .release        = ffs_attr_release,
 };
 
-static struct config_item_type ffs_func_type = {
+static const struct config_item_type ffs_func_type = {
        .ct_item_ops    = &ffs_item_ops,
        .ct_owner       = THIS_MODULE,
 };
index d8e359ef6eb1d525e96c027868ce55ac6aa0f1e0..6993cb844a3f7e858849c51c249534ec6041f0a8 100644 (file)
@@ -992,7 +992,7 @@ static struct configfs_attribute *hid_attrs[] = {
        NULL,
 };
 
-static struct config_item_type hid_func_type = {
+static const struct config_item_type hid_func_type = {
        .ct_item_ops    = &hidg_item_ops,
        .ct_attrs       = hid_attrs,
        .ct_owner       = THIS_MODULE,
index e70093835e14a275edbf7c387d89c9f20da488c6..9311f8ce80c5c731c98cf78e23fdaeca0ff9dbb8 100644 (file)
@@ -556,7 +556,7 @@ static struct configfs_attribute *lb_attrs[] = {
        NULL,
 };
 
-static struct config_item_type lb_func_type = {
+static const struct config_item_type lb_func_type = {
        .ct_item_ops    = &lb_item_ops,
        .ct_attrs       = lb_attrs,
        .ct_owner       = THIS_MODULE,
index 5153e29870c3917fe4cdefc1e4c920536cdd4bf4..a538be384d7c6e9501d56f4633f1af76e5a8936c 100644 (file)
@@ -3140,7 +3140,7 @@ static struct configfs_attribute *fsg_lun_attrs[] = {
        NULL,
 };
 
-static struct config_item_type fsg_lun_type = {
+static const struct config_item_type fsg_lun_type = {
        .ct_item_ops    = &fsg_lun_item_ops,
        .ct_attrs       = fsg_lun_attrs,
        .ct_owner       = THIS_MODULE,
@@ -3331,7 +3331,7 @@ static struct configfs_group_operations fsg_group_ops = {
        .drop_item      = fsg_lun_drop,
 };
 
-static struct config_item_type fsg_func_type = {
+static const struct config_item_type fsg_func_type = {
        .ct_item_ops    = &fsg_item_ops,
        .ct_group_ops   = &fsg_group_ops,
        .ct_attrs       = fsg_attrs,
index 5d3d7941d2c2227f5ae9d9f219d34bfd0156665f..53fa073f88ed51a99719173eb2ace04435aff188 100644 (file)
@@ -1189,7 +1189,7 @@ static struct configfs_attribute *midi_attrs[] = {
        NULL,
 };
 
-static struct config_item_type midi_func_type = {
+static const struct config_item_type midi_func_type = {
        .ct_item_ops    = &midi_item_ops,
        .ct_attrs       = midi_attrs,
        .ct_owner       = THIS_MODULE,
index 45b334ceaf2e399987661652219f6af7032b139c..3599aa4ea73b9494598dd1a04495540ed8ae6768 100644 (file)
@@ -1568,7 +1568,7 @@ static struct configfs_attribute *ncm_attrs[] = {
        NULL,
 };
 
-static struct config_item_type ncm_func_type = {
+static const struct config_item_type ncm_func_type = {
        .ct_item_ops    = &ncm_item_ops,
        .ct_attrs       = ncm_attrs,
        .ct_owner       = THIS_MODULE,
index d43e86cea74f34253c4f7bbbaa73e8f42cf7ffae..9fc798822adf171ac5203ce72c002f15e4b480b0 100644 (file)
@@ -411,7 +411,7 @@ static struct configfs_attribute *acm_attrs[] = {
        NULL,
 };
 
-static struct config_item_type obex_func_type = {
+static const struct config_item_type obex_func_type = {
        .ct_item_ops    = &obex_item_ops,
        .ct_attrs       = acm_attrs,
        .ct_owner       = THIS_MODULE,
index 9c4c58e4a1a287d16dad907fca178b527e885bea..5fe1f2ae0b6c4d0b2a41f47265bf69ddbc1071f8 100644 (file)
@@ -599,7 +599,7 @@ static struct configfs_attribute *phonet_attrs[] = {
        NULL,
 };
 
-static struct config_item_type phonet_func_type = {
+static const struct config_item_type phonet_func_type = {
        .ct_item_ops    = &phonet_item_ops,
        .ct_attrs       = phonet_attrs,
        .ct_owner       = THIS_MODULE,
index ea0da35a44e2e9f3f2c0e11921568da68b70fafd..80728365d0a998a5f5e9fa8cf045d72c35372e4f 100644 (file)
@@ -1261,7 +1261,7 @@ static struct configfs_attribute *printer_attrs[] = {
        NULL,
 };
 
-static struct config_item_type printer_func_type = {
+static const struct config_item_type printer_func_type = {
        .ct_item_ops    = &printer_item_ops,
        .ct_attrs       = printer_attrs,
        .ct_owner       = THIS_MODULE,
index c7c5b3ce1d98840d8d4e9122d60fd51ae75b330d..b981545088f892e65866550cd643148c7360a713 100644 (file)
@@ -890,7 +890,7 @@ static struct configfs_attribute *rndis_attrs[] = {
        NULL,
 };
 
-static struct config_item_type rndis_func_type = {
+static const struct config_item_type rndis_func_type = {
        .ct_item_ops    = &rndis_item_ops,
        .ct_attrs       = rndis_attrs,
        .ct_owner       = THIS_MODULE,
index cb00ada21d9c2505fa0a04af3a1624dcc99722eb..4ee860bb31c841d2957a82c74b6b549e064a23da 100644 (file)
@@ -281,7 +281,7 @@ static struct configfs_attribute *acm_attrs[] = {
        NULL,
 };
 
-static struct config_item_type serial_func_type = {
+static const struct config_item_type serial_func_type = {
        .ct_item_ops    = &serial_item_ops,
        .ct_attrs       = acm_attrs,
        .ct_owner       = THIS_MODULE,
index 8784fa12ea2c637b52857a15f01f6dbeb965ec15..ed22e1895b09b08cf35a05671ab05faff21a567d 100644 (file)
@@ -1230,7 +1230,7 @@ static struct configfs_attribute *ss_attrs[] = {
        NULL,
 };
 
-static struct config_item_type ss_func_type = {
+static const struct config_item_type ss_func_type = {
        .ct_item_ops    = &ss_item_ops,
        .ct_attrs       = ss_attrs,
        .ct_owner       = THIS_MODULE,
index 434b983f3b4c244f538cf6f12e90015c3ac4f78e..e810d15d3831bdfc408a991f72409ab989e832b6 100644 (file)
@@ -412,7 +412,7 @@ static struct configfs_attribute *gether_attrs[] = {
        NULL,
 };
 
-static struct config_item_type gether_func_type = {
+static const struct config_item_type gether_func_type = {
        .ct_item_ops    = &gether_item_ops,
        .ct_attrs       = gether_attrs,
        .ct_owner       = THIS_MODULE,
index a82e2bd5ea34d97996cb79ba5b72d09aed86e09a..e3cec75837aef7331d021b46db3c80ce670cff8e 100644 (file)
@@ -2166,7 +2166,7 @@ static struct configfs_item_operations tcm_item_ops = {
        .release                = tcm_attr_release,
 };
 
-static struct config_item_type tcm_func_type = {
+static const struct config_item_type tcm_func_type = {
        .ct_item_ops    = &tcm_item_ops,
        .ct_owner       = THIS_MODULE,
 };
index 29efbedc91f9b1bfe9a3d84d5c906c5fc38fc775..4d5487ad8ffa4d43d551c43c5b816fedc0efe163 100644 (file)
@@ -709,7 +709,7 @@ static struct configfs_attribute *f_uac1_attrs[] = {
        NULL,
 };
 
-static struct config_item_type f_uac1_func_type = {
+static const struct config_item_type f_uac1_func_type = {
        .ct_item_ops    = &f_uac1_item_ops,
        .ct_attrs       = f_uac1_attrs,
        .ct_owner       = THIS_MODULE,
index 5d229e72912ed02beb4f328445b4b840519156d3..178fd12f9724878bd19c295bf43d09560918dfe3 100644 (file)
@@ -921,7 +921,7 @@ static struct configfs_attribute *f_uac1_attrs[] = {
        NULL,
 };
 
-static struct config_item_type f_uac1_func_type = {
+static const struct config_item_type f_uac1_func_type = {
        .ct_item_ops    = &f_uac1_item_ops,
        .ct_attrs       = f_uac1_attrs,
        .ct_owner       = THIS_MODULE,
index f05c3f3e6103c61ca322da00fce6d5fc02aa1881..7bb9737bf229ae8cb3a1154e26fc33fdef77f648 100644 (file)
@@ -921,7 +921,7 @@ static struct configfs_attribute *f_uac2_attrs[] = {
        NULL,
 };
 
-static struct config_item_type f_uac2_func_type = {
+static const struct config_item_type f_uac2_func_type = {
        .ct_item_ops    = &f_uac2_item_ops,
        .ct_attrs       = f_uac2_attrs,
        .ct_owner       = THIS_MODULE,
index 844cb738bafd00537b567038301beb7f5850f034..f76619f1321d436441ecf410d4afec4468961c3a 100644 (file)
@@ -127,7 +127,7 @@ static struct configfs_attribute *uvcg_control_header_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_control_header_type = {
+static const struct config_item_type uvcg_control_header_type = {
        .ct_attrs       = uvcg_control_header_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -170,7 +170,7 @@ static struct configfs_group_operations uvcg_control_header_grp_ops = {
        .drop_item              = uvcg_control_header_drop,
 };
 
-static struct config_item_type uvcg_control_header_grp_type = {
+static const struct config_item_type uvcg_control_header_grp_type = {
        .ct_group_ops   = &uvcg_control_header_grp_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -265,7 +265,7 @@ static struct configfs_attribute *uvcg_default_processing_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_default_processing_type = {
+static const struct config_item_type uvcg_default_processing_type = {
        .ct_attrs       = uvcg_default_processing_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -277,7 +277,7 @@ static struct uvcg_processing_grp {
        struct config_group     group;
 } uvcg_processing_grp;
 
-static struct config_item_type uvcg_processing_grp_type = {
+static const struct config_item_type uvcg_processing_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -382,7 +382,7 @@ static struct configfs_attribute *uvcg_default_camera_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_default_camera_type = {
+static const struct config_item_type uvcg_default_camera_type = {
        .ct_attrs       = uvcg_default_camera_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -394,7 +394,7 @@ static struct uvcg_camera_grp {
        struct config_group     group;
 } uvcg_camera_grp;
 
-static struct config_item_type uvcg_camera_grp_type = {
+static const struct config_item_type uvcg_camera_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -460,7 +460,7 @@ static struct configfs_attribute *uvcg_default_output_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_default_output_type = {
+static const struct config_item_type uvcg_default_output_type = {
        .ct_attrs       = uvcg_default_output_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -472,7 +472,7 @@ static struct uvcg_output_grp {
        struct config_group     group;
 } uvcg_output_grp;
 
-static struct config_item_type uvcg_output_grp_type = {
+static const struct config_item_type uvcg_output_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -481,7 +481,7 @@ static struct uvcg_terminal_grp {
        struct config_group     group;
 } uvcg_terminal_grp;
 
-static struct config_item_type uvcg_terminal_grp_type = {
+static const struct config_item_type uvcg_terminal_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -586,7 +586,7 @@ static struct configfs_item_operations uvcg_control_class_item_ops = {
        .drop_link      = uvcg_control_class_drop_link,
 };
 
-static struct config_item_type uvcg_control_class_type = {
+static const struct config_item_type uvcg_control_class_type = {
        .ct_item_ops    = &uvcg_control_class_item_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -596,7 +596,7 @@ static struct uvcg_control_class_grp {
        struct config_group     group;
 } uvcg_control_class_grp;
 
-static struct config_item_type uvcg_control_class_grp_type = {
+static const struct config_item_type uvcg_control_class_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -605,7 +605,7 @@ static struct uvcg_control_grp {
        struct config_group     group;
 } uvcg_control_grp;
 
-static struct config_item_type uvcg_control_grp_type = {
+static const struct config_item_type uvcg_control_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -857,7 +857,7 @@ static struct configfs_attribute *uvcg_streaming_header_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_streaming_header_type = {
+static const struct config_item_type uvcg_streaming_header_type = {
        .ct_item_ops    = &uvcg_streaming_header_item_ops,
        .ct_attrs       = uvcg_streaming_header_attrs,
        .ct_owner       = THIS_MODULE,
@@ -901,7 +901,7 @@ static struct configfs_group_operations uvcg_streaming_header_grp_ops = {
        .drop_item              = uvcg_streaming_header_drop,
 };
 
-static struct config_item_type uvcg_streaming_header_grp_type = {
+static const struct config_item_type uvcg_streaming_header_grp_type = {
        .ct_group_ops   = &uvcg_streaming_header_grp_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -1150,7 +1150,7 @@ static struct configfs_attribute *uvcg_frame_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_frame_type = {
+static const struct config_item_type uvcg_frame_type = {
        .ct_attrs       = uvcg_frame_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -1419,7 +1419,7 @@ static struct configfs_attribute *uvcg_uncompressed_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_uncompressed_type = {
+static const struct config_item_type uvcg_uncompressed_type = {
        .ct_group_ops   = &uvcg_uncompressed_group_ops,
        .ct_attrs       = uvcg_uncompressed_attrs,
        .ct_owner       = THIS_MODULE,
@@ -1469,7 +1469,7 @@ static struct configfs_group_operations uvcg_uncompressed_grp_ops = {
        .drop_item              = uvcg_uncompressed_drop,
 };
 
-static struct config_item_type uvcg_uncompressed_grp_type = {
+static const struct config_item_type uvcg_uncompressed_grp_type = {
        .ct_group_ops   = &uvcg_uncompressed_grp_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -1619,7 +1619,7 @@ static struct configfs_attribute *uvcg_mjpeg_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_mjpeg_type = {
+static const struct config_item_type uvcg_mjpeg_type = {
        .ct_group_ops   = &uvcg_mjpeg_group_ops,
        .ct_attrs       = uvcg_mjpeg_attrs,
        .ct_owner       = THIS_MODULE,
@@ -1663,7 +1663,7 @@ static struct configfs_group_operations uvcg_mjpeg_grp_ops = {
        .drop_item              = uvcg_mjpeg_drop,
 };
 
-static struct config_item_type uvcg_mjpeg_grp_type = {
+static const struct config_item_type uvcg_mjpeg_grp_type = {
        .ct_group_ops   = &uvcg_mjpeg_grp_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -1728,7 +1728,7 @@ static struct configfs_attribute *uvcg_default_color_matching_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvcg_default_color_matching_type = {
+static const struct config_item_type uvcg_default_color_matching_type = {
        .ct_attrs       = uvcg_default_color_matching_attrs,
        .ct_owner       = THIS_MODULE,
 };
@@ -1740,7 +1740,7 @@ static struct uvcg_color_matching_grp {
        struct config_group     group;
 } uvcg_color_matching_grp;
 
-static struct config_item_type uvcg_color_matching_grp_type = {
+static const struct config_item_type uvcg_color_matching_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -2085,7 +2085,7 @@ static struct configfs_item_operations uvcg_streaming_class_item_ops = {
        .drop_link      = uvcg_streaming_class_drop_link,
 };
 
-static struct config_item_type uvcg_streaming_class_type = {
+static const struct config_item_type uvcg_streaming_class_type = {
        .ct_item_ops    = &uvcg_streaming_class_item_ops,
        .ct_owner       = THIS_MODULE,
 };
@@ -2095,7 +2095,7 @@ static struct uvcg_streaming_class_grp {
        struct config_group     group;
 } uvcg_streaming_class_grp;
 
-static struct config_item_type uvcg_streaming_class_grp_type = {
+static const struct config_item_type uvcg_streaming_class_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -2104,7 +2104,7 @@ static struct uvcg_streaming_grp {
        struct config_group     group;
 } uvcg_streaming_grp;
 
-static struct config_item_type uvcg_streaming_grp_type = {
+static const struct config_item_type uvcg_streaming_grp_type = {
        .ct_owner = THIS_MODULE,
 };
 
@@ -2190,7 +2190,7 @@ static struct configfs_attribute *uvc_attrs[] = {
        NULL,
 };
 
-static struct config_item_type uvc_func_type = {
+static const struct config_item_type uvc_func_type = {
        .ct_item_ops    = &uvc_item_ops,
        .ct_attrs       = uvc_attrs,
        .ct_owner       = THIS_MODULE,