aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index 23786ee34bed..38de1a4f825f 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -964,7 +964,7 @@ static int cpmac_open(struct net_device *dev)
964 struct sk_buff *skb; 964 struct sk_buff *skb;
965 965
966 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs"); 966 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs");
967 if (!request_mem_region(mem->start, mem->end - mem->start, dev->name)) { 967 if (!request_mem_region(mem->start, resource_size(mem), dev->name)) {
968 if (netif_msg_drv(priv)) 968 if (netif_msg_drv(priv))
969 printk(KERN_ERR "%s: failed to request registers\n", 969 printk(KERN_ERR "%s: failed to request registers\n",
970 dev->name); 970 dev->name);
@@ -972,7 +972,7 @@ static int cpmac_open(struct net_device *dev)
972 goto fail_reserve; 972 goto fail_reserve;
973 } 973 }
974 974
975 priv->regs = ioremap(mem->start, mem->end - mem->start); 975 priv->regs = ioremap(mem->start, resource_size(mem));
976 if (!priv->regs) { 976 if (!priv->regs) {
977 if (netif_msg_drv(priv)) 977 if (netif_msg_drv(priv))
978 printk(KERN_ERR "%s: failed to remap registers\n", 978 printk(KERN_ERR "%s: failed to remap registers\n",
@@ -1049,7 +1049,7 @@ fail_alloc:
1049 iounmap(priv->regs); 1049 iounmap(priv->regs);
1050 1050
1051fail_remap: 1051fail_remap:
1052 release_mem_region(mem->start, mem->end - mem->start); 1052 release_mem_region(mem->start, resource_size(mem));
1053 1053
1054fail_reserve: 1054fail_reserve:
1055 return res; 1055 return res;
@@ -1077,7 +1077,7 @@ static int cpmac_stop(struct net_device *dev)
1077 free_irq(dev->irq, dev); 1077 free_irq(dev->irq, dev);
1078 iounmap(priv->regs); 1078 iounmap(priv->regs);
1079 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs"); 1079 mem = platform_get_resource_byname(priv->pdev, IORESOURCE_MEM, "regs");
1080 release_mem_region(mem->start, mem->end - mem->start); 1080 release_mem_region(mem->start, resource_size(mem));
1081 priv->rx_head = &priv->desc_ring[CPMAC_QUEUES]; 1081 priv->rx_head = &priv->desc_ring[CPMAC_QUEUES];
1082 for (i = 0; i < priv->ring_size; i++) { 1082 for (i = 0; i < priv->ring_size; i++) {
1083 if (priv->rx_head[i].skb) { 1083 if (priv->rx_head[i].skb) {