replace open-coded container_of() with to_config_usb_cfg() helper. Reviewed-by: Jack Pham <quic_jackp@xxxxxxxxxxx> Signed-off-by: Linyu Yuan <quic_linyyuan@xxxxxxxxxxx> --- drivers/usb/gadget/configfs.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c index ae0890a..ff0fb33 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; -- 2.7.4