Commit 96c24072 authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

[PATCH] Non-PCI OHCI drivers: remove hcd release

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.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 188d5650
......@@ -146,6 +146,7 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_lh7a404_probe (const struct hc_driver *driver,
*/
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 @@ void usb_hcd_lh7a404_remove (struct usb_hcd *hcd, struct platform_device *dev)
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 @@ static const struct hc_driver ohci_lh7a404_hc_driver = {
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
.hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
......
......@@ -322,7 +322,7 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_omap_probe (const struct hc_driver *driver,
*/
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 @@ void usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
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 @@ static const struct hc_driver ohci_omap_hc_driver = {
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
.hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
......
......@@ -244,6 +244,7 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver,
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";
......@@ -262,9 +263,8 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver,
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
......@@ -288,8 +288,6 @@ int usb_hcd_pxa27x_probe (const struct hc_driver *driver,
*/
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 ())
......@@ -308,9 +306,6 @@ void usb_hcd_pxa27x_remove (struct usb_hcd *hcd, struct platform_device *dev)
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);
......@@ -359,7 +354,6 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
.hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
......
......@@ -194,6 +194,7 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
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 @@ int usb_hcd_sa1111_probe (const struct hc_driver *driver,
*/
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 @@ void usb_hcd_sa1111_remove (struct usb_hcd *hcd, struct sa1111_dev *dev)
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 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
* memory lifecycle (except per-request)
*/
.hcd_alloc = ohci_hcd_alloc,
.hcd_free = ohci_hcd_free,
/*
* managing i/o requests and associated device resources
......
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