summaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/musb_gadget.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-02-16 12:40:05 +0200
committerFelipe Balbi <balbi@ti.com>2011-02-17 21:11:46 +0200
commitad1adb89a0d9410345d573b6995a1fa9f9b7c74a (patch)
treeb07349993d6eec5dff875f5517b0c79667906a8b /drivers/usb/musb/musb_gadget.h
parent63eed2b52494e35aaf38ac2db537d6ea0a55b0da (diff)
downloadtalos-obmc-linux-ad1adb89a0d9410345d573b6995a1fa9f9b7c74a.tar.gz
talos-obmc-linux-ad1adb89a0d9410345d573b6995a1fa9f9b7c74a.zip
usb: musb: gadget: do not poke with gadget's list_head
struct usb_request's list_head is supposed to be used only by gadget drivers, but musb is abusing that. Give struct musb_request its own list_head and prevent musb from poking into other driver's business. Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb/musb_gadget.h')
-rw-r--r--drivers/usb/musb/musb_gadget.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/usb/musb/musb_gadget.h b/drivers/usb/musb/musb_gadget.h
index a55354fbccf5..66b7c5e0fb44 100644
--- a/drivers/usb/musb/musb_gadget.h
+++ b/drivers/usb/musb/musb_gadget.h
@@ -35,6 +35,8 @@
#ifndef __MUSB_GADGET_H
#define __MUSB_GADGET_H
+#include <linux/list.h>
+
enum buffer_map_state {
UN_MAPPED = 0,
PRE_MAPPED,
@@ -43,6 +45,7 @@ enum buffer_map_state {
struct musb_request {
struct usb_request request;
+ struct list_head list;
struct musb_ep *ep;
struct musb *musb;
u8 tx; /* endpoint direction */
@@ -94,13 +97,13 @@ static inline struct musb_ep *to_musb_ep(struct usb_ep *ep)
return ep ? container_of(ep, struct musb_ep, end_point) : NULL;
}
-static inline struct usb_request *next_request(struct musb_ep *ep)
+static inline struct musb_request *next_request(struct musb_ep *ep)
{
struct list_head *queue = &ep->req_list;
if (list_empty(queue))
return NULL;
- return container_of(queue->next, struct usb_request, list);
+ return container_of(queue->next, struct musb_request, list);
}
extern void musb_g_tx(struct musb *musb, u8 epnum);
OpenPOWER on IntegriCloud