summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/fsl_qe_udc.c
diff options
context:
space:
mode:
authorMichal Nazarewicz <mina86@mina86.com>2011-11-19 18:27:38 +0100
committerFelipe Balbi <balbi@ti.com>2011-12-12 11:45:12 +0200
commit7177aed44f515d949f587170e0e177ce17e74793 (patch)
tree07cc5c1d077fb9748fbe5966d440612c1b9497ce /drivers/usb/gadget/fsl_qe_udc.c
parentd327ab5b6d660d6fe22b073b743fde1668e593bb (diff)
usb: gadget: rename usb_gadget_driver::speed to max_speed
This commit renames the “speed” field of the usb_gadget_driver structure to “max_speed”. This is so that to make it more apparent that the field represents the maximum speed gadget driver can support. This also make the field look more like fields with the same name in usb_gadget and usb_composite_driver structures. All of those represent the *maximal* speed given entity supports. After this commit, there are the following fields in various structures: * usb_gadget::speed - the current connection speed, * usb_gadget::max_speed - maximal speed UDC supports, * usb_gadget_driver::max_speed - maximal speed gadget driver supports, and * usb_composite_driver::max_speed - maximal speed composite gadget supports. Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/gadget/fsl_qe_udc.c')
-rw-r--r--drivers/usb/gadget/fsl_qe_udc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/fsl_qe_udc.c b/drivers/usb/gadget/fsl_qe_udc.c
index e00cf92409c..b7a1efef938 100644
--- a/drivers/usb/gadget/fsl_qe_udc.c
+++ b/drivers/usb/gadget/fsl_qe_udc.c
@@ -2336,7 +2336,7 @@ static int fsl_qe_start(struct usb_gadget_driver *driver,
if (!udc_controller)
return -ENODEV;
- if (!driver || driver->speed < USB_SPEED_FULL
+ if (!driver || driver->max_speed < USB_SPEED_FULL
|| !bind || !driver->disconnect || !driver->setup)
return -EINVAL;
@@ -2350,7 +2350,7 @@ static int fsl_qe_start(struct usb_gadget_driver *driver,
/* hook up the driver */
udc_controller->driver = driver;
udc_controller->gadget.dev.driver = &driver->driver;
- udc_controller->gadget.speed = (enum usb_device_speed)(driver->speed);
+ udc_controller->gadget.speed = driver->max_speed;
spin_unlock_irqrestore(&udc_controller->lock, flags);
retval = bind(&udc_controller->gadget);