Commit 60a31804 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman

[PATCH] USB: usb gadget drivers, minor tweaks

This has minor patches to the ethernet, file_storage, and zero
gadget drivers.

 - Use longer "manufacturer" strings; CONFIG_LOCALVERSION would overflow.

 - Remove compile warning on file_storage with non-net2280

 - Oops fix in ethernet gadget, on boards that don't report VBUS
Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ed3361ff
......@@ -856,7 +856,7 @@ static inline void __init hs_subset_descriptors(void)
/* descriptors that are built on-demand */
static char manufacturer [40];
static char manufacturer [50];
static char product_desc [40] = DRIVER_DESC;
#ifdef DEV_CONFIG_CDC
......@@ -2183,7 +2183,7 @@ static int eth_stop (struct net_device *net)
);
/* ensure there are no more active requests */
if (dev->gadget->speed != USB_SPEED_UNKNOWN) {
if (dev->config) {
usb_ep_disable (dev->in_ep);
usb_ep_disable (dev->out_ep);
if (netif_carrier_ok (dev->net)) {
......
......@@ -1010,7 +1010,7 @@ static const struct usb_descriptor_header *hs_function[] = {
/* The CBI specification limits the serial string to 12 uppercase hexadecimal
* characters. */
static char manufacturer[40];
static char manufacturer[50];
static char serial[13];
/* Static strings, in UTF-8 (for simplicity we use only ASCII characters) */
......@@ -1035,7 +1035,9 @@ static struct usb_gadget_strings stringtab = {
static int populate_config_buf(struct usb_gadget *gadget,
u8 *buf, u8 type, unsigned index)
{
#ifdef CONFIG_USB_GADGET_DUALSPEED
enum usb_device_speed speed = gadget->speed;
#endif
int len;
const struct usb_descriptor_header **function;
......
......@@ -396,7 +396,7 @@ static const struct usb_descriptor_header *hs_loopback_function [] = {
#endif /* !CONFIG_USB_GADGET_DUALSPEED */
static char manufacturer [40];
static char manufacturer [50];
static char serial [40];
/* static strings, in UTF-8 */
......
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