usb: gadget: udc-core: initialize parent
authorFelipe Balbi <balbi@ti.com>
Tue, 26 Feb 2013 08:59:41 +0000 (10:59 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 18 Mar 2013 09:17:17 +0000 (11:17 +0200)
if udc-core always does it, we can delete
some extra lines from all UDC drivers. Besides,
it avoids mistakes from happening and propagating.

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

index 3e19a016c197cc167b5348520c7819b726e0de33..447a1614736e53b1a9a2b5e67281b4bfbf635f94 100644 (file)
@@ -184,6 +184,7 @@ int usb_add_gadget_udc(struct device *parent, struct usb_gadget *gadget)
                goto err1;
 
        dev_set_name(&gadget->dev, "gadget");
+       gadget->dev.parent = parent;
 
        dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
        gadget->dev.dma_parms = parent->dma_parms;