Commit 310e9e33 authored by Michael Grzeschik's avatar Michael Grzeschik Committed by Greg Kroah-Hartman

isp1760-if: make module unloads correctly

Without this patch, the prepared disable routines
will not be called on module unloading.
Signed-off-by: default avatarMichael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 58c559e6
...@@ -398,6 +398,9 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev) ...@@ -398,6 +398,9 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev)
hcd = isp1760_register(mem_res->start, mem_size, irq_res->start, hcd = isp1760_register(mem_res->start, mem_size, irq_res->start,
irqflags, -ENOENT, irqflags, -ENOENT,
&pdev->dev, dev_name(&pdev->dev), devflags); &pdev->dev, dev_name(&pdev->dev), devflags);
dev_set_drvdata(&pdev->dev, hcd);
if (IS_ERR(hcd)) { if (IS_ERR(hcd)) {
pr_warning("isp1760: Failed to register the HCD device\n"); pr_warning("isp1760: Failed to register the HCD device\n");
ret = -ENODEV; ret = -ENODEV;
...@@ -417,11 +420,16 @@ static int __devexit isp1760_plat_remove(struct platform_device *pdev) ...@@ -417,11 +420,16 @@ static int __devexit isp1760_plat_remove(struct platform_device *pdev)
{ {
struct resource *mem_res; struct resource *mem_res;
resource_size_t mem_size; resource_size_t mem_size;
struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev);
usb_remove_hcd(hcd);
mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
mem_size = resource_size(mem_res); mem_size = resource_size(mem_res);
release_mem_region(mem_res->start, mem_size); release_mem_region(mem_res->start, mem_size);
usb_put_hcd(hcd);
return 0; return 0;
} }
......
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