aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/westbridge
diff options
context:
space:
mode:
authorDavid Cross <david.cross@cypress.com>2010-09-23 20:20:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-29 21:28:26 -0400
commit9ebed608bde8e27a1993f1b12eff16e04c8c419e (patch)
treea06a96957358c1685deb9c513f0ea6fb7957d303 /drivers/staging/westbridge
parenta06b1414a4d1850244827dc61382f44525151e92 (diff)
Staging: west bridge, cyasgadget fix for usb_gadget_probe_driver
This patch fixes the west bridge cyasgadget driver in order to allow for compilation against the linux-next tree. This changes usb_gadget_register_driver to usb_gadget_probe_driver and updates this function based on the new function definition (bind call). Signed-off-by: David Cross <david.cross@cypress.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/westbridge')
-rw-r--r--drivers/staging/westbridge/astoria/gadget/cyasgadget.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/staging/westbridge/astoria/gadget/cyasgadget.c b/drivers/staging/westbridge/astoria/gadget/cyasgadget.c
index 756ff278f66..0b00271cbeb 100644
--- a/drivers/staging/westbridge/astoria/gadget/cyasgadget.c
+++ b/drivers/staging/westbridge/astoria/gadget/cyasgadget.c
@@ -1882,9 +1882,8 @@ static void cyas_ep0_start(
1882 * disconnect is reported. then a host may connect again, or 1882 * disconnect is reported. then a host may connect again, or
1883 * the driver might get unbound. 1883 * the driver might get unbound.
1884 */ 1884 */
1885int usb_gadget_register_driver( 1885int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
1886 struct usb_gadget_driver *driver 1886 int (*bind)(struct usb_gadget *))
1887 )
1888{ 1887{
1889 cyasgadget *dev = cy_as_gadget_controller ; 1888 cyasgadget *dev = cy_as_gadget_controller ;
1890 int retval; 1889 int retval;
@@ -1898,7 +1897,7 @@ int usb_gadget_register_driver(
1898 * "must not be used in normal operation" 1897 * "must not be used in normal operation"
1899 */ 1898 */
1900 if (!driver 1899 if (!driver
1901 || !driver->bind 1900 || !bind
1902 || !driver->unbind 1901 || !driver->unbind
1903 || !driver->setup) 1902 || !driver->setup)
1904 return -EINVAL; 1903 return -EINVAL;
@@ -1919,7 +1918,7 @@ int usb_gadget_register_driver(
1919 cyas_usb_reset(dev) ; /* External usb */ 1918 cyas_usb_reset(dev) ; /* External usb */
1920 cyas_usb_reinit(dev) ; /* Internal */ 1919 cyas_usb_reinit(dev) ; /* Internal */
1921 1920
1922 retval = driver->bind(&dev->gadget); 1921 retval = bind(&dev->gadget);
1923 if (retval) { 1922 if (retval) {
1924 #ifndef WESTBRIDGE_NDEBUG 1923 #ifndef WESTBRIDGE_NDEBUG
1925 cy_as_hal_print_message("%s bind to driver %s --> %d\n", 1924 cy_as_hal_print_message("%s bind to driver %s --> %d\n",
@@ -1938,7 +1937,7 @@ int usb_gadget_register_driver(
1938 1937
1939 return 0; 1938 return 0;
1940} 1939}
1941EXPORT_SYMBOL(usb_gadget_register_driver); 1940EXPORT_SYMBOL(usb_gadget_probe_driver);
1942 1941
1943static void cyasgadget_nuke( 1942static void cyasgadget_nuke(
1944 cyasgadget_ep *an_ep 1943 cyasgadget_ep *an_ep