Skip to content

Commit

Permalink
usb: dwc2: gadget: Do not fail probe if there isn't a clock node
Browse files Browse the repository at this point in the history
Since the dwc2 hcd driver is currently not looking for a clock node during
init, we should not completely fail if there isn't a clock provided.
By assigning clk = NULL, this allows the driver, when configured for dual-role
mode, to be able to continue loading the host portion of the driver when
a clock node is not specified.

Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Dinh Nguyen authored and Felipe Balbi committed Nov 14, 2014
1 parent db8178c commit 8d736d8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/usb/dwc2/gadget.c
Original file line number Diff line number Diff line change
Expand Up @@ -3431,6 +3431,7 @@ int dwc2_gadget_init(struct dwc2_hsotg *hsotg, int irq)

hsotg->clk = devm_clk_get(dev, "otg");
if (IS_ERR(hsotg->clk)) {
hsotg->clk = NULL;
dev_err(dev, "cannot get otg clock\n");
return PTR_ERR(hsotg->clk);
}
Expand Down

0 comments on commit 8d736d8

Please sign in to comment.