Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325802
b: refs/heads/master
c: 8ca41ae
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent a32d97f commit ac2f4c1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 979834313271203d1e6e84241cc3aca4503a3dbb
refs/heads/master: 8ca41ae35f5567280eac787a9cc9bcd5988b9f82
20 changes: 4 additions & 16 deletions trunk/drivers/usb/host/ehci-au1xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,23 +98,17 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
hcd->rsrc_start = res->start;
hcd->rsrc_len = resource_size(res);

if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
pr_debug("request_mem_region failed");
ret = -EBUSY;
goto err1;
}

hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
hcd->regs = devm_request_and_ioremap(&pdev->dev, res);
if (!hcd->regs) {
pr_debug("ioremap failed");
pr_debug("devm_request_and_ioremap failed");
ret = -ENOMEM;
goto err2;
goto err1;
}

if (alchemy_usb_control(ALCHEMY_USB_EHCI0, 1)) {
printk(KERN_INFO "%s: controller init failed!\n", pdev->name);
ret = -ENODEV;
goto err3;
goto err1;
}

ret = usb_add_hcd(hcd, pdev->resource[1].start,
Expand All @@ -125,10 +119,6 @@ static int ehci_hcd_au1xxx_drv_probe(struct platform_device *pdev)
}

alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
err3:
iounmap(hcd->regs);
err2:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err1:
usb_put_hcd(hcd);
return ret;
Expand All @@ -140,8 +130,6 @@ static int ehci_hcd_au1xxx_drv_remove(struct platform_device *pdev)

usb_remove_hcd(hcd);
alchemy_usb_control(ALCHEMY_USB_EHCI0, 0);
iounmap(hcd->regs);
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
usb_put_hcd(hcd);
platform_set_drvdata(pdev, NULL);

Expand Down

0 comments on commit ac2f4c1

Please sign in to comment.