diff options
author | Pekka Enberg <penberg@kernel.org> | 2010-10-24 20:57:05 +0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2010-10-24 20:57:05 +0400 |
commit | 6d4121f6c20a0e86231d52f535f1c82423b3326f (patch) | |
tree | 5c235cac699ca86b504850aa663ddadde0455a61 /drivers/usb/gadget/atmel_usba_udc.c | |
parent | 92a5bbc11ff2442a54b2f1d313088c245828ef4e (diff) | |
parent | 35da7a307c535f9c2929cae277f3df425c9f9b1e (diff) | |
download | linux-6d4121f6c20a0e86231d52f535f1c82423b3326f.tar.xz |
Merge branch 'master' into for-linus
Conflicts:
include/linux/percpu.h
mm/percpu.c
Diffstat (limited to 'drivers/usb/gadget/atmel_usba_udc.c')
-rw-r--r-- | drivers/usb/gadget/atmel_usba_udc.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/usb/gadget/atmel_usba_udc.c b/drivers/usb/gadget/atmel_usba_udc.c index d623c7bda1f6..b5e20e873cba 100644 --- a/drivers/usb/gadget/atmel_usba_udc.c +++ b/drivers/usb/gadget/atmel_usba_udc.c @@ -1789,7 +1789,8 @@ out: return IRQ_HANDLED; } -int usb_gadget_register_driver(struct usb_gadget_driver *driver) +int usb_gadget_probe_driver(struct usb_gadget_driver *driver, + int (*bind)(struct usb_gadget *)) { struct usba_udc *udc = &the_udc; unsigned long flags; @@ -1812,7 +1813,7 @@ int usb_gadget_register_driver(struct usb_gadget_driver *driver) clk_enable(udc->pclk); clk_enable(udc->hclk); - ret = driver->bind(&udc->gadget); + ret = bind(&udc->gadget); if (ret) { DBG(DBG_ERR, "Could not bind to driver %s: error %d\n", driver->driver.name, ret); @@ -1841,7 +1842,7 @@ err_driver_bind: udc->gadget.dev.driver = NULL; return ret; } -EXPORT_SYMBOL(usb_gadget_register_driver); +EXPORT_SYMBOL(usb_gadget_probe_driver); int usb_gadget_unregister_driver(struct usb_gadget_driver *driver) { @@ -2014,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; } } |