diff options
author | Felipe Balbi <balbi@ti.com> | 2013-02-26 15:25:41 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2013-03-18 11:17:56 +0200 |
commit | ddf47ccbfebc12add813cf729ecfc2d5ab59ca19 (patch) | |
tree | 98ab07310f361562b7f9644ea96608e624c965f6 /drivers/usb/gadget/udc-core.c | |
parent | 3920193d8e71d1f7e0d077aa71624b64fa3499ac (diff) | |
download | op-kernel-dev-ddf47ccbfebc12add813cf729ecfc2d5ab59ca19.zip op-kernel-dev-ddf47ccbfebc12add813cf729ecfc2d5ab59ca19.tar.gz |
usb: gadget: udc-core: remove protection when setting gadget.dev.release
now that no UDC driver touches gadget.dev.release
we can assign our release function to it without
being afraid of breaking anything.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/udc-core.c')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index a50811e..26e116b 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -198,12 +198,10 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget, gadget->dev.dma_parms = parent->dma_parms; gadget->dev.dma_mask = parent->dma_mask; - if (release) { + if (release) gadget->dev.release = release; - } else { - if (!gadget->dev.release) - gadget->dev.release = usb_udc_nop_release; - } + else + gadget->dev.release = usb_udc_nop_release; ret = device_register(&gadget->dev); if (ret) |