Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325816
b: refs/heads/master
c: 6df471e
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Greg Kroah-Hartman committed Aug 10, 2012
1 parent 7ef2879 commit 064ad67
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 18 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: f1d4eb788a007e3816132e6d1d28c25a64e86d24
refs/heads/master: 6df471ea04bd65603b67d821f2df359cc2cfac68
20 changes: 3 additions & 17 deletions trunk/drivers/usb/host/ehci-xilinx-of.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,24 +152,18 @@ static int __devinit ehci_hcd_xilinx_of_probe(struct platform_device *op)
hcd->rsrc_start = res.start;
hcd->rsrc_len = resource_size(&res);

if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len, hcd_name)) {
printk(KERN_ERR "%s: request_mem_region failed\n", __FILE__);
rv = -EBUSY;
goto err_rmr;
}

irq = irq_of_parse_and_map(dn, 0);
if (!irq) {
printk(KERN_ERR "%s: irq_of_parse_and_map failed\n", __FILE__);
rv = -EBUSY;
goto err_irq;
}

hcd->regs = ioremap(hcd->rsrc_start, hcd->rsrc_len);
hcd->regs = devm_request_and_ioremap(&op->dev, &res);
if (!hcd->regs) {
printk(KERN_ERR "%s: ioremap failed\n", __FILE__);
pr_err("%s: devm_request_and_ioremap failed\n", __FILE__);
rv = -ENOMEM;
goto err_ioremap;
goto err_irq;
}

ehci = hcd_to_ehci(hcd);
Expand Down Expand Up @@ -200,12 +194,7 @@ static int __devinit ehci_hcd_xilinx_of_probe(struct platform_device *op)
if (rv == 0)
return 0;

iounmap(hcd->regs);

err_ioremap:
err_irq:
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
err_rmr:
usb_put_hcd(hcd);

return rv;
Expand All @@ -227,9 +216,6 @@ static int ehci_hcd_xilinx_of_remove(struct platform_device *op)

usb_remove_hcd(hcd);

iounmap(hcd->regs);
release_mem_region(hcd->rsrc_start, hcd->rsrc_len);

usb_put_hcd(hcd);

return 0;
Expand Down

0 comments on commit 064ad67

Please sign in to comment.