This series try to remove some usage of gadget_is_dualspeed(), gadget_is_superspeed() and gadget_is_superspeed_plus(). please check each change for details. Linyu Yuan (7): usb: gadget: f_ecm: fix ecm_bitrate() for SuperSpeed and above usb: gaget: use working speed to calcaulate network bitrate and qlen usb: gadget: f_uvc: change endpoint allocation in uvc_function_bind() usb: gadget: unconditionally allocate hs/ss descriptor in bind operation usb: gadget: config: remove max speed check in usb_assign_descriptors() usb: gadget: composite: cleanup function config_ep_by_speed_and_alt() usb: gadget: remove max support speed info in bind operation drivers/usb/gadget/composite.c | 34 ++++++------- drivers/usb/gadget/config.c | 8 ++-- drivers/usb/gadget/function/f_acm.c | 4 +- drivers/usb/gadget/function/f_ecm.c | 12 ++--- drivers/usb/gadget/function/f_eem.c | 4 +- drivers/usb/gadget/function/f_loopback.c | 4 +- drivers/usb/gadget/function/f_midi.c | 56 +++++++++------------- drivers/usb/gadget/function/f_midi2.c | 44 +++++++---------- drivers/usb/gadget/function/f_ncm.c | 10 ++-- drivers/usb/gadget/function/f_obex.c | 3 +- drivers/usb/gadget/function/f_rndis.c | 10 ++-- drivers/usb/gadget/function/f_serial.c | 4 +- drivers/usb/gadget/function/f_sourcesink.c | 4 +- drivers/usb/gadget/function/f_subset.c | 4 +- drivers/usb/gadget/function/f_uvc.c | 36 +++++--------- drivers/usb/gadget/function/u_ether.c | 5 +- 16 files changed, 92 insertions(+), 150 deletions(-) -- 2.17.1