diff options
author | Yusuke Goda <yusuke.goda.sx@renesas.com> | 2010-10-19 20:28:08 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:22:18 -0400 |
commit | e576a7a96aae99b74dd758fff54c345f8f4ff097 (patch) | |
tree | 0aee718026c3316dd033df7c3c421e06806c3740 /drivers/usb | |
parent | 69cb1ec4ce4da4bc4c07bb09c4c98b3e25d99fb1 (diff) |
usb: r8a66597-udc: Add processing when USB was removed.
When USB was removed, this patch prepares for the next insertion.
Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Acked-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/r8a66597-udc.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/r8a66597-udc.c b/drivers/usb/gadget/r8a66597-udc.c index 157640f7d2a8..20d43da319ae 100644 --- a/drivers/usb/gadget/r8a66597-udc.c +++ b/drivers/usb/gadget/r8a66597-udc.c | |||
@@ -42,6 +42,7 @@ static const char *r8a66597_ep_name[] = { | |||
42 | "ep8", "ep9", | 42 | "ep8", "ep9", |
43 | }; | 43 | }; |
44 | 44 | ||
45 | static void init_controller(struct r8a66597 *r8a66597); | ||
45 | static void disable_controller(struct r8a66597 *r8a66597); | 46 | static void disable_controller(struct r8a66597 *r8a66597); |
46 | static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req); | 47 | static void irq_ep0_write(struct r8a66597_ep *ep, struct r8a66597_request *req); |
47 | static void irq_packet_write(struct r8a66597_ep *ep, | 48 | static void irq_packet_write(struct r8a66597_ep *ep, |
@@ -104,6 +105,8 @@ __acquires(r8a66597->lock) | |||
104 | spin_lock(&r8a66597->lock); | 105 | spin_lock(&r8a66597->lock); |
105 | 106 | ||
106 | disable_controller(r8a66597); | 107 | disable_controller(r8a66597); |
108 | init_controller(r8a66597); | ||
109 | r8a66597_bset(r8a66597, VBSE, INTENB0); | ||
107 | INIT_LIST_HEAD(&r8a66597->ep[0].queue); | 110 | INIT_LIST_HEAD(&r8a66597->ep[0].queue); |
108 | } | 111 | } |
109 | 112 | ||