diff options
Diffstat (limited to 'drivers/usb/chipidea')
-rw-r--r-- | drivers/usb/chipidea/core.c | 14 | ||||
-rw-r--r-- | drivers/usb/chipidea/udc.c | 3 |
2 files changed, 3 insertions, 14 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 26062d610c20..215c655295b8 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -903,10 +903,7 @@ static struct attribute *ci_attrs[] = { &dev_attr_role.attr, NULL, }; - -static const struct attribute_group ci_attr_group = { - .attrs = ci_attrs, -}; +ATTRIBUTE_GROUPS(ci); static int ci_hdrc_probe(struct platform_device *pdev) { @@ -1008,7 +1005,6 @@ static int ci_hdrc_probe(struct platform_device *pdev) ci->irq = platform_get_irq(pdev, 0); if (ci->irq < 0) { - dev_err(dev, "missing IRQ\n"); ret = ci->irq; goto deinit_phy; } @@ -1106,14 +1102,8 @@ static int ci_hdrc_probe(struct platform_device *pdev) device_set_wakeup_capable(&pdev->dev, true); dbg_create_files(ci); - ret = sysfs_create_group(&dev->kobj, &ci_attr_group); - if (ret) - goto remove_debug; - return 0; -remove_debug: - dbg_remove_files(ci); stop: if (ci->is_otg && ci->roles[CI_ROLE_GADGET]) ci_hdrc_otg_destroy(ci); @@ -1140,7 +1130,6 @@ static int ci_hdrc_remove(struct platform_device *pdev) } dbg_remove_files(ci); - sysfs_remove_group(&ci->dev->kobj, &ci_attr_group); ci_role_destroy(ci); ci_hdrc_enter_lpm(ci, true); ci_usb_phy_exit(ci); @@ -1319,6 +1308,7 @@ static struct platform_driver ci_hdrc_driver = { .driver = { .name = "ci_hdrc", .pm = &ci_pm_ops, + .dev_groups = ci_groups, }, }; diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 6a5ee8e6da10..053432d79bf7 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1746,12 +1746,11 @@ static int ci_udc_start(struct usb_gadget *gadget, struct usb_gadget_driver *driver) { struct ci_hdrc *ci = container_of(gadget, struct ci_hdrc, gadget); - int retval = -ENOMEM; + int retval; if (driver->disconnect == NULL) return -EINVAL; - ci->ep0out->ep.desc = &ctrl_endpt_out_desc; retval = usb_ep_enable(&ci->ep0out->ep); if (retval) |