On Mon, 4 Oct 2010, Felipe Balbi wrote: > use new interfaces from udc-core on dummy_hcd > testing driver. ... > -/* The gadget structure is stored inside the hcd structure and will be > - * released along with it. */ > -static void > -dummy_gadget_release (struct device *dev) > -{ > - struct dummy *dum = gadget_dev_to_dummy (dev); > - > - usb_put_hcd (dummy_to_hcd (dum)); > -} > - > static int dummy_udc_probe (struct platform_device *pdev) > { > struct dummy *dum = the_controller; > int rc; > > + dum->udc.name = gadget_name; > dum->gadget.name = gadget_name; > dum->gadget.ops = &dummy_ops; > dum->gadget.is_dualspeed = 1; > + dum->udc.gadget = &dum->gadget; > > /* maybe claim OTG support, though we won't complete HNP */ > dum->gadget.is_otg = (dummy_to_hcd(dum)->self.otg_port != 0); > > dev_set_name(&dum->gadget.dev, "gadget"); > - dum->gadget.dev.parent = &pdev->dev; > - dum->gadget.dev.release = dummy_gadget_release; > - rc = device_register (&dum->gadget.dev); > + rc = usb_add_udc(&pdev->dev, &dum->udc); > if (rc < 0) > return rc; Present at this point in the code, although not shown in the patch, is this line: usb_get_hcd (dummy_to_hcd (dum)); I have not checked in any detail, but it certainly seems suspicious that the patch removes a usb_put_hcd call without removing the corresponding usb_get_hcd call. Alan Stern -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html