Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189853
b: refs/heads/master
c: b622268
h: refs/heads/master
i:
  189851: e38236e
v: v3
  • Loading branch information
Dan Carpenter authored and David S. Miller committed Apr 8, 2010
1 parent 72aae3b commit 06fb41c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 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: ddd0451fc8dbf94446c81500ff0dcee06c4057cb
refs/heads/master: b62226826b4ea1926b644b5a337ffa6b637d4870
10 changes: 5 additions & 5 deletions trunk/drivers/net/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1685,7 +1685,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
}
pr_info("done!\n");

if (!request_mem_region(res->start, (res->end - res->start),
if (!request_mem_region(res->start, resource_size(res),
pdev->name)) {
pr_err("%s: ERROR: memory allocation failed"
"cannot get the I/O addr 0x%x\n",
Expand All @@ -1694,9 +1694,9 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
goto out;
}

addr = ioremap(res->start, (res->end - res->start));
addr = ioremap(res->start, resource_size(res));
if (!addr) {
pr_err("%s: ERROR: memory mapping failed \n", __func__);
pr_err("%s: ERROR: memory mapping failed\n", __func__);
ret = -ENOMEM;
goto out;
}
Expand Down Expand Up @@ -1774,7 +1774,7 @@ static int stmmac_dvr_probe(struct platform_device *pdev)
out:
if (ret < 0) {
platform_set_drvdata(pdev, NULL);
release_mem_region(res->start, (res->end - res->start));
release_mem_region(res->start, resource_size(res));
if (addr != NULL)
iounmap(addr);
}
Expand Down Expand Up @@ -1812,7 +1812,7 @@ static int stmmac_dvr_remove(struct platform_device *pdev)

iounmap((void *)ndev->base_addr);
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
release_mem_region(res->start, (res->end - res->start));
release_mem_region(res->start, resource_size(res));

free_netdev(ndev);

Expand Down

0 comments on commit 06fb41c

Please sign in to comment.