Commit 9ebed608 authored by David Cross's avatar David Cross Committed by Greg Kroah-Hartman

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: default avatarDavid Cross <david.cross@cypress.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a06b1414
...@@ -1882,9 +1882,8 @@ static void cyas_ep0_start( ...@@ -1882,9 +1882,8 @@ static void cyas_ep0_start(
* disconnect is reported. then a host may connect again, or * disconnect is reported. then a host may connect again, or
* the driver might get unbound. * the driver might get unbound.
*/ */
int usb_gadget_register_driver( int usb_gadget_probe_driver(struct usb_gadget_driver *driver,
struct usb_gadget_driver *driver int (*bind)(struct usb_gadget *))
)
{ {
cyasgadget *dev = cy_as_gadget_controller ; cyasgadget *dev = cy_as_gadget_controller ;
int retval; int retval;
...@@ -1898,7 +1897,7 @@ int usb_gadget_register_driver( ...@@ -1898,7 +1897,7 @@ int usb_gadget_register_driver(
* "must not be used in normal operation" * "must not be used in normal operation"
*/ */
if (!driver if (!driver
|| !driver->bind || !bind
|| !driver->unbind || !driver->unbind
|| !driver->setup) || !driver->setup)
return -EINVAL; return -EINVAL;
...@@ -1919,7 +1918,7 @@ int usb_gadget_register_driver( ...@@ -1919,7 +1918,7 @@ int usb_gadget_register_driver(
cyas_usb_reset(dev) ; /* External usb */ cyas_usb_reset(dev) ; /* External usb */
cyas_usb_reinit(dev) ; /* Internal */ cyas_usb_reinit(dev) ; /* Internal */
retval = driver->bind(&dev->gadget); retval = bind(&dev->gadget);
if (retval) { if (retval) {
#ifndef WESTBRIDGE_NDEBUG #ifndef WESTBRIDGE_NDEBUG
cy_as_hal_print_message("%s bind to driver %s --> %d\n", cy_as_hal_print_message("%s bind to driver %s --> %d\n",
...@@ -1938,7 +1937,7 @@ int usb_gadget_register_driver( ...@@ -1938,7 +1937,7 @@ int usb_gadget_register_driver(
return 0; return 0;
} }
EXPORT_SYMBOL(usb_gadget_register_driver); EXPORT_SYMBOL(usb_gadget_probe_driver);
static void cyasgadget_nuke( static void cyasgadget_nuke(
cyasgadget_ep *an_ep cyasgadget_ep *an_ep
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment