diff options
author | Linyu Yuan <quic_linyyuan@quicinc.com> | 2021-11-18 12:53:32 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-11-23 14:12:48 +0100 |
commit | 5d143ec451429891385a21617b292f2ceaa684ea (patch) | |
tree | 61bea8df69c84c950c7bb4c1b3b2084a06687824 /drivers/usb/gadget | |
parent | ff5a938d12f213194d796d3018b102389b7d9f9c (diff) | |
download | linux-5d143ec451429891385a21617b292f2ceaa684ea.tar.gz linux-5d143ec451429891385a21617b292f2ceaa684ea.tar.bz2 linux-5d143ec451429891385a21617b292f2ceaa684ea.zip |
usb: gadget: configfs: use to_config_usb_cfg() in os_desc_link()
replace open-coded container_of() with to_config_usb_cfg() helper.
Reviewed-by: Jack Pham <quic_jackp@quicinc.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1637211213-16400-4-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/configfs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index ae0890a06861..ff0fb33abb94 100644 --- a/drivers/usb/gadget/configfs.c +++ b/drivers/usb/gadget/configfs.c @@ -883,9 +883,7 @@ static int os_desc_link(struct config_item *os_desc_ci, { struct gadget_info *gi = os_desc_item_to_gadget_info(os_desc_ci); struct usb_composite_dev *cdev = &gi->cdev; - struct config_usb_cfg *c_target = - container_of(to_config_group(usb_cfg_ci), - struct config_usb_cfg, group); + struct config_usb_cfg *c_target = to_config_usb_cfg(usb_cfg_ci); struct usb_configuration *c; int ret; |