From: Oleksij Rempel <ore@pengutronix.de>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 3/4] usbgadget: only set to peripheral mode when error checking is done
Date: Fri, 29 Sep 2017 15:06:00 +0200 [thread overview]
Message-ID: <20170929130600.2k7xiezcog5kqaqd@pengutronix.de> (raw)
In-Reply-To: <20170927091245.9476-4-s.hauer@pengutronix.de>
On Wed, Sep 27, 2017 at 11:12:44AM +0200, Sascha Hauer wrote:
> Only begin to modify the hardware when the obious errors have been
> checked.
>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/usb/gadget/autostart.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/usb/gadget/autostart.c b/drivers/usb/gadget/autostart.c
> index a27be899c3..2ca979057e 100644
> --- a/drivers/usb/gadget/autostart.c
> +++ b/drivers/usb/gadget/autostart.c
> @@ -39,8 +39,6 @@ static int usbgadget_autostart(void)
> if (!autostart)
> return 0;
>
> - setenv("otg.mode", "peripheral");
> -
> opts = xzalloc(sizeof(*opts));
> opts->release = usb_multi_opts_release;
>
> @@ -60,6 +58,8 @@ static int usbgadget_autostart(void)
> return 0;
> }
>
> + setenv("otg.mode", "peripheral");
> +
> ret = usb_multi_register(opts);
> if (ret)
> usb_multi_opts_release(opts);
> --
> 2.11.0
>
>
Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-09-29 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 9:12 usbgadget fix some crashes Sascha Hauer
2017-09-27 9:12 ` [PATCH 1/4] usbgadget: autostart: Handle errors in file list gracefully Sascha Hauer
2017-09-29 13:02 ` Oleksij Rempel
2017-09-27 9:12 ` [PATCH 2/4] usbgadget: do not register when no functions present Sascha Hauer
2017-09-29 13:05 ` Oleksij Rempel
2017-09-27 9:12 ` [PATCH 3/4] usbgadget: only set to peripheral mode when error checking is done Sascha Hauer
2017-09-29 13:06 ` Oleksij Rempel [this message]
2017-09-27 9:12 ` [PATCH 4/4] usbgadget: unregister when usb_composite_probe() fails Sascha Hauer
2017-09-29 13:08 ` Oleksij Rempel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170929130600.2k7xiezcog5kqaqd@pengutronix.de \
--to=ore@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=s.hauer@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox