Greg:

This patch removes the hcd release code from the final host controller 
driver, dummy-hcd.  Please apply.

Alan Stern



Signed-off-by: Alan Stern <[EMAIL PROTECTED]>

===== drivers/usb/gadget/dummy_hcd.c 1.15 vs edited =====
--- 1.15/drivers/usb/gadget/dummy_hcd.c 2004-10-20 12:38:08 -04:00
+++ edited/drivers/usb/gadget/dummy_hcd.c       2004-10-29 11:38:24 -04:00
@@ -144,6 +144,7 @@
 #define FIFO_SIZE              64
 
 struct dummy {
+       struct usb_hcd                  hcd;            /* must come first! */
        spinlock_t                      lock;
 
        /*
@@ -160,7 +161,6 @@
        /*
         * MASTER/HOST side support
         */
-       struct usb_hcd                  hcd;
        struct timer_list               timer;
        u32                             port_status;
        unsigned                        started:1;
@@ -1568,16 +1568,6 @@
        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
@@ -1715,7 +1705,6 @@
        .stop =                 dummy_stop,
 
        .hcd_alloc =            dummy_alloc,
-       .hcd_free =             dummy_free,
 
        .urb_enqueue =          dummy_urb_enqueue,
        .urb_dequeue =          dummy_urb_dequeue,
@@ -1761,6 +1750,7 @@
 
        usb_bus_init (&hcd->self);
        hcd->self.op = &usb_hcd_operations;
+       hcd->self.release = &usb_hcd_release;
        hcd->self.hcpriv = hcd;
        hcd->self.bus_name = dev->bus_id;
        hcd->product_desc = "Dummy host controller";
@@ -1774,7 +1764,7 @@
        return retval;
 
 err1:
-       hcd->driver->hcd_free (hcd);
+       kfree (hcd);
        dev_set_drvdata (dev, NULL);
        return retval;
 }
@@ -1799,8 +1789,7 @@
 
        dev_set_drvdata (dev, NULL);
        usb_deregister_bus (&hcd->self);
-
-       hcd->driver->hcd_free (hcd);
+       the_controller = NULL;
 }
 
 /*-------------------------------------------------------------------------*/



-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to