mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: barebox@lists.infradead.org, mfe@pengutronix.de
Subject: Re: [PATCH] usb: usb251xb: fix optional reset gpio request
Date: Mon, 17 Jun 2019 14:25:46 +0200	[thread overview]
Message-ID: <20190617122546.qsz4f3yfby6dujam@pengutronix.de> (raw)
In-Reply-To: <20190617095125.4190-1-m.felsch@pengutronix.de>

On Mon, Jun 17, 2019 at 11:51:25AM +0200, Marco Felsch wrote:
> Linux requests the reset gpio optional by using devm_gpiod_get_optional().
> We need to do this here too because the reset can be a global shared
> reset line e.g. board por. We haven't such a helper so just drop the
> final else path.
> 
> Fixes: 937fa50d9c ("usb: Port Microchip USB251x USB hub driver from Linux")
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
>  drivers/usb/misc/usb251xb.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
> index 97f55efa82..006ee3b426 100644
> --- a/drivers/usb/misc/usb251xb.c
> +++ b/drivers/usb/misc/usb251xb.c
> @@ -339,7 +339,7 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>  {
>  	struct device_d *dev = hub->dev;
>  	struct device_node *np = dev->device_node;
> -	int len, err, i;
> +	int len, i;
>  	u32 port, property_u32 = 0;
>  	const u32 *cproperty_u32;
>  	const char *cproperty_char;
> @@ -374,10 +374,6 @@ static int usb251xb_get_ofdata(struct usb251xb *hub,
>  			return ret;
>  	} else if (hub->gpio_reset == -EPROBE_DEFER) {
>  		return -EPROBE_DEFER;
> -	} else {
> -		err = hub->gpio_reset;
> -		dev_err(dev, "unable to request GPIO reset pin (%d)\n", err);
> -		return err;
>  	}
>  
>  	if (of_property_read_u16_array(np, "vendor-id", &hub->vendor_id, 1))
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
> 

-- 
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

      reply	other threads:[~2019-06-17 12:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-17  9:51 Marco Felsch
2019-06-17 12:25 ` Sascha Hauer [this message]

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=20190617122546.qsz4f3yfby6dujam@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=m.felsch@pengutronix.de \
    --cc=mfe@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