diff options
author | Marco Felsch <m.felsch@pengutronix.de> | 2019-06-17 11:51:25 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-06-17 14:25:34 +0200 |
commit | 19a08eb51fe6fe70ab56de7fa1a3fa1250fa6dd1 (patch) | |
tree | f86c74ab4e8217c92785627eec1a1295ddb8aa9f /drivers/usb | |
parent | b66b5822204af2b4fa12795d4c641202d2873742 (diff) | |
download | barebox-19a08eb51fe6fe70ab56de7fa1a3fa1250fa6dd1.tar.gz barebox-19a08eb51fe6fe70ab56de7fa1a3fa1250fa6dd1.tar.xz |
usb: usb251xb: fix optional reset gpio request
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>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/misc/usb251xb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c index a7a444e039..10d5aa310b 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)) |