Skip to contentSkip to conversation

usb: chipidea: core: change vbus-regulator as optional

PATCH New Peter Chen 1 participant 1 message Sep 24, 2019

Subsystems (2)
lore
Share & tools
lore

Peter Chen

author
#0 lore raw

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

Vbus regualtor is an optional regulator, for platforms, which doesn't have this regulator, it will get a dummy regulator and show warning message.

---
 drivers/usb/chipidea/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/chipidea/core.c +1 -1
index 8cb2ed3dabfe..38b01a334d8f 100644
@@ -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) {
Signature · 1 line
2.17.1