usb: gadget: amd5536udc: don't assign gadget.dev.release directly
authorFelipe Balbi <balbi@ti.com>
Tue, 26 Feb 2013 13:15:25 +0000 (15:15 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:17:46 +0000 (11:17 +0200)
udc-core provides a better way to handle release
methods, let's use it.

Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/amd5536udc.c

index a8ff93cf344db685b0bf994c61e6c3aaf5584cb7..f52dcfe8f545077df80aca9cb97f1ec2e72b6261 100644 (file)
@@ -3268,7 +3268,6 @@ static int udc_probe(struct udc *dev)
        dev->gadget.ops = &udc_ops;
 
        dev_set_name(&dev->gadget.dev, "gadget");
-       dev->gadget.dev.release = gadget_release;
        dev->gadget.name = name;
        dev->gadget.max_speed = USB_SPEED_HIGH;
 
@@ -3292,7 +3291,8 @@ static int udc_probe(struct udc *dev)
                "driver version: %s(for Geode5536 B1)\n", tmp);
        udc = dev;
 
-       retval = usb_add_gadget_udc(&udc->pdev->dev, &dev->gadget);
+       retval = usb_add_gadget_udc_release(&udc->pdev->dev, &dev->gadget,
+                       gadget_release);
        if (retval)
                goto finished;