Commit 56e1e60b authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] dummy-hcd: removal hcd release

This patch removes the hcd release code from the final host controller
driver, dummy-hcd.  Please apply.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 96c24072
...@@ -144,6 +144,7 @@ static const char *const ep_name [] = { ...@@ -144,6 +144,7 @@ static const char *const ep_name [] = {
#define FIFO_SIZE 64 #define FIFO_SIZE 64
struct dummy { struct dummy {
struct usb_hcd hcd; /* must come first! */
spinlock_t lock; spinlock_t lock;
/* /*
...@@ -160,7 +161,6 @@ struct dummy { ...@@ -160,7 +161,6 @@ struct dummy {
/* /*
* MASTER/HOST side support * MASTER/HOST side support
*/ */
struct usb_hcd hcd;
struct timer_list timer; struct timer_list timer;
u32 port_status; u32 port_status;
unsigned started:1; unsigned started:1;
...@@ -1568,16 +1568,6 @@ static struct usb_hcd *dummy_alloc (void) ...@@ -1568,16 +1568,6 @@ static struct usb_hcd *dummy_alloc (void)
return &dum->hcd; return &dum->hcd;
} }
static void dummy_free (struct usb_hcd *hcd)
{
struct dummy *dum;
dum = hcd_to_dummy (hcd);
WARN_ON (dum->driver != 0);
kfree (dum);
the_controller = NULL;
}
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
static inline ssize_t static inline ssize_t
...@@ -1715,7 +1705,6 @@ static const struct hc_driver dummy_hcd = { ...@@ -1715,7 +1705,6 @@ static const struct hc_driver dummy_hcd = {
.stop = dummy_stop, .stop = dummy_stop,
.hcd_alloc = dummy_alloc, .hcd_alloc = dummy_alloc,
.hcd_free = dummy_free,
.urb_enqueue = dummy_urb_enqueue, .urb_enqueue = dummy_urb_enqueue,
.urb_dequeue = dummy_urb_dequeue, .urb_dequeue = dummy_urb_dequeue,
...@@ -1761,6 +1750,7 @@ static int dummy_probe (struct device *dev) ...@@ -1761,6 +1750,7 @@ static int dummy_probe (struct device *dev)
usb_bus_init (&hcd->self); usb_bus_init (&hcd->self);
hcd->self.op = &usb_hcd_operations; hcd->self.op = &usb_hcd_operations;
hcd->self.release = &usb_hcd_release;
hcd->self.hcpriv = hcd; hcd->self.hcpriv = hcd;
hcd->self.bus_name = dev->bus_id; hcd->self.bus_name = dev->bus_id;
hcd->product_desc = "Dummy host controller"; hcd->product_desc = "Dummy host controller";
...@@ -1774,7 +1764,7 @@ static int dummy_probe (struct device *dev) ...@@ -1774,7 +1764,7 @@ static int dummy_probe (struct device *dev)
return retval; return retval;
err1: err1:
hcd->driver->hcd_free (hcd); kfree (hcd);
dev_set_drvdata (dev, NULL); dev_set_drvdata (dev, NULL);
return retval; return retval;
} }
...@@ -1799,8 +1789,7 @@ static void dummy_remove (struct device *dev) ...@@ -1799,8 +1789,7 @@ static void dummy_remove (struct device *dev)
dev_set_drvdata (dev, NULL); dev_set_drvdata (dev, NULL);
usb_deregister_bus (&hcd->self); usb_deregister_bus (&hcd->self);
the_controller = NULL;
hcd->driver->hcd_free (hcd);
} }
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
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