diff options
Diffstat (limited to 'drivers/usb/host/isp1760-if.c')
-rw-r--r-- | drivers/usb/host/isp1760-if.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/isp1760-if.c b/drivers/usb/host/isp1760-if.c index 4592dc17a9f9..fff114fd5461 100644 --- a/drivers/usb/host/isp1760-if.c +++ b/drivers/usb/host/isp1760-if.c | |||
@@ -398,6 +398,9 @@ static int __devinit isp1760_plat_probe(struct platform_device *pdev) | |||
398 | hcd = isp1760_register(mem_res->start, mem_size, irq_res->start, | 398 | hcd = isp1760_register(mem_res->start, mem_size, irq_res->start, |
399 | irqflags, -ENOENT, | 399 | irqflags, -ENOENT, |
400 | &pdev->dev, dev_name(&pdev->dev), devflags); | 400 | &pdev->dev, dev_name(&pdev->dev), devflags); |
401 | |||
402 | dev_set_drvdata(&pdev->dev, hcd); | ||
403 | |||
401 | if (IS_ERR(hcd)) { | 404 | if (IS_ERR(hcd)) { |
402 | pr_warning("isp1760: Failed to register the HCD device\n"); | 405 | pr_warning("isp1760: Failed to register the HCD device\n"); |
403 | ret = -ENODEV; | 406 | ret = -ENODEV; |
@@ -417,11 +420,16 @@ static int __devexit isp1760_plat_remove(struct platform_device *pdev) | |||
417 | { | 420 | { |
418 | struct resource *mem_res; | 421 | struct resource *mem_res; |
419 | resource_size_t mem_size; | 422 | resource_size_t mem_size; |
423 | struct usb_hcd *hcd = dev_get_drvdata(&pdev->dev); | ||
424 | |||
425 | usb_remove_hcd(hcd); | ||
420 | 426 | ||
421 | mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 427 | mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
422 | mem_size = resource_size(mem_res); | 428 | mem_size = resource_size(mem_res); |
423 | release_mem_region(mem_res->start, mem_size); | 429 | release_mem_region(mem_res->start, mem_size); |
424 | 430 | ||
431 | usb_put_hcd(hcd); | ||
432 | |||
425 | return 0; | 433 | return 0; |
426 | } | 434 | } |
427 | 435 | ||