diff mbox series

[1/1] usb: chipidea: core: change vbus-regulator as optional

Message ID 20190924082455.32472-1-peter.chen@nxp.com (mailing list archive)
State Mainlined
Commit 782c1c49f3dbf335de6b95f2d97b105cca236bc9
Headers show
Series [1/1] usb: chipidea: core: change vbus-regulator as optional | expand

Commit Message

Peter Chen Sept. 24, 2019, 8:23 a.m. UTC
Vbus regualtor is an optional regulator, for platforms, which
doesn't have this regulator, it will get a dummy regulator and
show warning message.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
---
 drivers/usb/chipidea/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 8cb2ed3dabfe..38b01a334d8f 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -676,7 +676,7 @@  static int ci_get_platdata(struct device *dev,
 
 	if (platdata->dr_mode != USB_DR_MODE_PERIPHERAL) {
 		/* Get the vbus regulator */
-		platdata->reg_vbus = devm_regulator_get(dev, "vbus");
+		platdata->reg_vbus = devm_regulator_get_optional(dev, "vbus");
 		if (PTR_ERR(platdata->reg_vbus) == -EPROBE_DEFER) {
 			return -EPROBE_DEFER;
 		} else if (PTR_ERR(platdata->reg_vbus) == -ENODEV) {