The USB gadget autostart code issues a warning when no otg device exists: Cannot set parameter otg.mode: No such device This is unnecessary since there may be no otg device at all, but only a gadget device. Drop that warning by checking if there is a otg device first. Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> --- drivers/usb/gadget/autostart.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/autostart.c b/drivers/usb/gadget/autostart.c index f640a9667d..272b0ea8fa 100644 --- a/drivers/usb/gadget/autostart.c +++ b/drivers/usb/gadget/autostart.c @@ -35,6 +35,7 @@ static int fastboot_bbu; static int usbgadget_autostart(void) { struct f_multi_opts *opts; + struct device_d *dev; int ret; if (!autostart) @@ -61,7 +62,9 @@ static int usbgadget_autostart(void) return 0; } - setenv("otg.mode", "peripheral"); + dev = get_device_by_name("otg"); + if (dev) + dev_set_param(dev, "mode", "peripheral"); ret = usb_multi_register(opts); if (ret) -- 2.19.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox