Re: [PATCH] usb: add new usb gadget for ACM and mass storage

From: Sergei Shtylyov
Date: Fri Oct 07 2011 - 07:14:42 EST

On 07.10.2011 14:14, Felipe Balbi wrote:

diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h
index dd1571d..f623f3d 100644
--- a/include/linux/usb/gadget.h
+++ b/include/linux/usb/gadget.h
@@ -15,6 +15,7 @@


this is not part of $SUBJECT

changed git message

not enough. adding another header is not part of this patch. You need to
let us know why you need this new header there and you need add proper
spacing there.

There is a space in the orginal patch.

Should i make a seperate patch for this?

In the header gadget.h are some stuff used, but not declared.

My compile errors without device.h:

CC drivers/usb/gadget/acm_ms.o
In file included from include/linux/usb/composite.h:38,
from drivers/usb/gadget/u_serial.h:15,
from drivers/usb/gadget/acm_ms.c:20:
include/linux/usb/gadget.h:491: error: field âdevâ has incomplete type
include/linux/usb/gadget.h: In function âset_gadget_dataâ:
include/linux/usb/gadget.h:495: error: implicit declaration of
function âdev_set_drvdataâ
include/linux/usb/gadget.h: In function âget_gadget_dataâ:
include/linux/usb/gadget.h:497: error: implicit declaration of
function âdev_get_drvdataâ
include/linux/usb/gadget.h: In function âdev_to_usb_gadgetâ:
include/linux/usb/gadget.h:500: warning: type defaults to âintâ in
declaration of â__mptrâ
include/linux/usb/gadget.h:500: warning: initialization from
incompatible pointer type
include/linux/usb/gadget.h: At top level:
include/linux/usb/gadget.h:781: error: field âdriverâ has incomplete type
In file included from drivers/usb/gadget/composite.c:26,
from drivers/usb/gadget/acm_ms.c:44:
include/linux/device.h:705: error: conflicting types for âdev_get_drvdataâ
include/linux/usb/gadget.h:497: note: previous implicit declaration
of âdev_get_drvdataâ was here
In file included from drivers/usb/gadget/acm_ms.c:44:
drivers/usb/gadget/composite.c:1261: error: field name not in record
or union initializer
drivers/usb/gadget/composite.c:1261: error: (near initialization for
make[3]: *** [drivers/usb/gadget/acm_ms.o] Error 1
make[2]: *** [drivers/usb/gadget] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2

I believe Sergei had that patch already, but it wasn't applied for some
reason. Sergei, do you happen to remember the outcome of that patch ?

It has been apllied allright to 3.1-rc1. :-)

WBR, Sergei

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at