[PATCH 1/1 v2] usb: at91_udc: fix typo on vubs pullup valid check

Subsystems: the rest, usb subsystem

STALE5018d

2 messages, 2 authors, 2012-11-05 · open the first message on its own page

[PATCH 1/1 v2] usb: at91_udc: fix typo on vubs pullup valid check

From: Jean-Christophe PLAGNIOL-VILLARD <hidden>
Date: 2012-11-05 09:34:52

if the gpio is not valid complain

since 3285e0ec088febc5a88f57ddd78385a7da71476c
ARM: at91/udc: use gpio_is_valid to check the gpio

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <redacted>
Cc: linux-usb at vger.kernel.org
Cc: stable at vger.kernel.org
Cc: Felipe Balbi <redacted>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Nicolas Ferre <redacted>
---
v2:

	update commit and put Felipe in Cc
Hi Greg,

	this is broken since 3.2 can we have on the stable too

Best Regards,
J.
 drivers/usb/gadget/at91_udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index 89d90b5..888cb2a 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -1739,7 +1739,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
 
 	/* rm9200 needs manual D+ pullup; off by default */
 	if (cpu_is_at91rm9200()) {
-		if (gpio_is_valid(udc->board.pullup_pin)) {
+		if (!gpio_is_valid(udc->board.pullup_pin)) {
 			DBG("no D+ pullup?\n");
 			retval = -ENODEV;
 			goto fail0;
-- 
1.7.10.4

[PATCH 1/1 v2] usb: at91_udc: fix typo on vubs pullup valid check

From: Russell King - ARM Linux <hidden>
Date: 2012-11-05 09:42:04

Subject: usb: at91_udc: fix typo on vubs pullup valid check
                                    ^^^^
typo.

On Mon, Nov 05, 2012 at 10:34:52AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
if the gpio is not valid complain

since 3285e0ec088febc5a88f57ddd78385a7da71476c
ARM: at91/udc: use gpio_is_valid to check the gpio
Poor description.

"The check for a valid vbus pullup gpio in commit 3285e0ec088f (ARM: at91/udc:
use gpio_is_valid to check the gpio) is inverted.  Fix this."

would be much better because it describes what the the actual problem is.
Your description could mean that it's missing the error return path, or
maybe you're adding a log message to the failure case, or...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help