usb: gadget: remove global variable composite in composite.c
This patch removes the global variable composite in composite.c. The private data which was saved there is now passed via an additional argument to the bind() function in struct usb_gadget_driver. Only the "old-style" UDC drivers have to be touched here, new style are doing it right because this change is made in udc-core. Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
This commit is contained in:

committed by
Felipe Balbi

parent
e220ff75db
commit
ffe0b33506
@@ -474,7 +474,8 @@ struct usb_gadget_ops {
|
||||
|
||||
/* Those two are deprecated */
|
||||
int (*start)(struct usb_gadget_driver *,
|
||||
int (*bind)(struct usb_gadget *));
|
||||
int (*bind)(struct usb_gadget *,
|
||||
struct usb_gadget_driver *driver));
|
||||
int (*stop)(struct usb_gadget_driver *);
|
||||
};
|
||||
|
||||
@@ -821,7 +822,8 @@ static inline int usb_gadget_disconnect(struct usb_gadget *gadget)
|
||||
struct usb_gadget_driver {
|
||||
char *function;
|
||||
enum usb_device_speed max_speed;
|
||||
int (*bind)(struct usb_gadget *gadget);
|
||||
int (*bind)(struct usb_gadget *gadget,
|
||||
struct usb_gadget_driver *driver);
|
||||
void (*unbind)(struct usb_gadget *);
|
||||
int (*setup)(struct usb_gadget *,
|
||||
const struct usb_ctrlrequest *);
|
||||
|
Reference in New Issue
Block a user