summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2010-09-20 18:31:07 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-10-22 10:21:47 -0700
commit969affff54702785330de553b790372e261e93f9 (patch)
treebddcd3e92dce21d70c6f661b2dfe8357841c8e53
parente5dcd531ac7a040f1b4d35f58914a36ad6174e84 (diff)
downloadop-kernel-dev-969affff54702785330de553b790372e261e93f9.zip
op-kernel-dev-969affff54702785330de553b790372e261e93f9.tar.gz
USB: atmel_usba_udc: force vbus_pin at -EINVAL when gpio_request failled
to ensure gpio_is_valid return false Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/gadget/atmel_usba_udc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c
index e4810c6..b5e20e8 100644
--- a/drivers/usb/gadget/atmel_usba_udc.c
+++ b/drivers/usb/gadget/atmel_usba_udc.c
@@ -2015,6 +2015,9 @@ static int __init usba_udc_probe(struct platform_device *pdev)
} else {
disable_irq(gpio_to_irq(udc->vbus_pin));
}
+ } else {
+ /* gpio_request fail so use -EINVAL for gpio_is_valid */
+ ubc->vbus_pin = -EINVAL;
}
}
OpenPOWER on IntegriCloud