Greg:
This patch changes the non-PCI-based OHCI-related host controller drivers,
removing the code that frees the driver-specific hcd structures.
Unfortunately I am not able to test it, because I don't have the necessary
hardware.
Alan Stern
Signed-off-by: Alan Stern <[EMAIL PROTECTED]>
===== drivers/usb/host/ohci-lh7a404.c 1.3 vs edited =====
--- 1.3/drivers/usb/host/ohci-lh7a404.c 2004-10-20 12:38:09 -04:00
+++ edited/drivers/usb/host/ohci-lh7a404.c 2004-10-28 11:31:11 -04:00
@@ -146,6 +146,7 @@
usb_bus_init (&hcd->self);
hcd->self.op = &usb_hcd_operations;
+ hcd->self.release = &usb_hcd_release;
hcd->self.hcpriv = (void *) hcd;
hcd->self.bus_name = "lh7a404";
hcd->product_desc = "LH7A404 OHCI";
@@ -165,9 +166,8 @@
err2:
hcd_buffer_destroy (hcd);
- if (hcd)
- driver->hcd_free(hcd);
err1:
+ kfree(hcd);
lh7a404_stop_hc(dev);
release_mem_region(dev->resource[0].start,
dev->resource[0].end
@@ -191,8 +191,6 @@
*/
void usb_hcd_lh7a404_remove (struct usb_hcd *hcd, struct platform_device *dev)
{
- void *base;
-
pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
if (in_interrupt ())
@@ -211,9 +209,6 @@
usb_deregister_bus (&hcd->self);
- base = hcd->regs;
- hcd->driver->hcd_free (hcd);
-
lh7a404_stop_hc(dev);
release_mem_region(dev->resource[0].start,
dev->resource[0].end
@@ -265,7 +260,6 @@
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
- .hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
===== drivers/usb/host/ohci-omap.c 1.16 vs edited =====
--- 1.16/drivers/usb/host/ohci-omap.c 2004-10-20 12:38:09 -04:00
+++ edited/drivers/usb/host/ohci-omap.c 2004-10-28 15:48:50 -04:00
@@ -322,7 +322,7 @@
retval = omap_start_hc(ohci, pdev);
if (retval < 0)
- goto err2;
+ goto err1;
retval = hcd_buffer_create (hcd);
if (retval != 0) {
@@ -342,6 +342,7 @@
usb_bus_init (&hcd->self);
hcd->self.op = &usb_hcd_operations;
+ hcd->self.release = &usb_hcd_release;
hcd->self.hcpriv = (void *) hcd;
hcd->self.bus_name = pdev->dev.bus_id;
hcd->product_desc = "OMAP OHCI";
@@ -359,9 +360,8 @@
err2:
hcd_buffer_destroy (hcd);
- if (hcd)
- driver->hcd_free(hcd);
err1:
+ kfree(hcd);
omap_stop_hc(pdev);
release_mem_region(pdev->resource[0].start,
@@ -387,8 +387,6 @@
*/
void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
{
- void *base;
-
dev_info(&pdev->dev, "remove: state %x\n", hcd->state);
if (in_interrupt ())
@@ -410,9 +408,6 @@
usb_deregister_bus (&hcd->self);
- base = hcd->regs;
- hcd->driver->hcd_free (hcd);
-
omap_stop_hc(pdev);
release_mem_region(pdev->resource[0].start,
@@ -464,7 +459,6 @@
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
- .hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
===== drivers/usb/host/ohci-pxa27x.c 1.1 vs edited =====
--- 1.1/drivers/usb/host/ohci-pxa27x.c 2004-10-20 12:28:19 -04:00
+++ edited/drivers/usb/host/ohci-pxa27x.c 2004-10-28 11:30:58 -04:00
@@ -243,6 +243,7 @@
usb_bus_init (&hcd->self);
hcd->self.op = &usb_hcd_operations;
+ hcd->self.release = &usb_hcd_release;
hcd->self.hcpriv = (void *) hcd;
hcd->self.bus_name = "pxa27x";
hcd->product_desc = "PXA27x OHCI";
@@ -261,9 +262,8 @@
err2:
hcd_buffer_destroy (hcd);
- if (hcd)
- driver->hcd_free(hcd);
err1:
+ kfree(hcd);
pxa27x_stop_hc(dev);
release_mem_region(dev->resource[0].start,
dev->resource[0].end
@@ -287,8 +287,6 @@
*/
void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *dev)
{
- void *base;
-
pr_debug ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
if (in_interrupt ())
@@ -307,9 +305,6 @@
usb_deregister_bus (&hcd->self);
- base = hcd->regs;
- hcd->driver->hcd_free (hcd);
-
pxa27x_stop_hc(dev);
release_mem_region(dev->resource[0].start,
dev->resource[0].end - dev->resource[0].start + 1);
@@ -358,7 +353,6 @@
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
- .hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
===== drivers/usb/host/ohci-sa1111.c 1.40 vs edited =====
--- 1.40/drivers/usb/host/ohci-sa1111.c 2004-10-20 12:38:10 -04:00
+++ edited/drivers/usb/host/ohci-sa1111.c 2004-10-28 11:31:46 -04:00
@@ -194,6 +194,7 @@
usb_bus_init (&hcd->self);
hcd->self.op = &usb_hcd_operations;
+ hcd->self.release = &usb_hcd_release;
hcd->self.hcpriv = (void *) hcd;
hcd->self.bus_name = "sa1111";
hcd->product_desc = "SA-1111 OHCI";
@@ -213,9 +214,8 @@
err2:
hcd_buffer_destroy (hcd);
- if (hcd)
- driver->hcd_free(hcd);
err1:
+ kfree(hcd);
sa1111_stop_hc(dev);
release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1);
return retval;
@@ -237,8 +237,6 @@
*/
void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
{
- void *base;
-
info ("remove: %s, state %x", hcd->self.bus_name, hcd->state);
if (in_interrupt ())
@@ -257,9 +255,6 @@
usb_deregister_bus (&hcd->self);
- base = hcd->regs;
- hcd->driver->hcd_free (hcd);
-
sa1111_stop_hc(dev);
release_mem_region(dev->res.start, dev->res.end - dev->res.start + 1);
}
@@ -308,7 +303,6 @@
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
- .hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
-------------------------------------------------------
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