aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethoc.c
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2010-01-15 04:48:22 -0500
committerDavid S. Miller <davem@davemloft.net>2010-01-15 04:48:22 -0500
commitd86458471aadffe93b741024b5a879ea5dc8df35 (patch)
tree3b1295b6b47766ea041cfe7809662b8397357ee9 /drivers/net/ethoc.c
parentc5bab5e94d148aee2c852450374143c89aa56511 (diff)
ethoc: Use resource_size
Use the resource_size function instead of manually calculating the resource size. Signed-off-by: Tobias Klauser <tklauser@distanz.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethoc.c')
-rw-r--r--drivers/net/ethoc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/ethoc.c b/drivers/net/ethoc.c
index bd1db92aec1b..f9d5ca078743 100644
--- a/drivers/net/ethoc.c
+++ b/drivers/net/ethoc.c
@@ -904,7 +904,7 @@ static int ethoc_probe(struct platform_device *pdev)
904 } 904 }
905 905
906 mmio = devm_request_mem_region(&pdev->dev, res->start, 906 mmio = devm_request_mem_region(&pdev->dev, res->start,
907 res->end - res->start + 1, res->name); 907 resource_size(res), res->name);
908 if (!mmio) { 908 if (!mmio) {
909 dev_err(&pdev->dev, "cannot request I/O memory space\n"); 909 dev_err(&pdev->dev, "cannot request I/O memory space\n");
910 ret = -ENXIO; 910 ret = -ENXIO;
@@ -917,7 +917,7 @@ static int ethoc_probe(struct platform_device *pdev)
917 res = platform_get_resource(pdev, IORESOURCE_MEM, 1); 917 res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
918 if (res) { 918 if (res) {
919 mem = devm_request_mem_region(&pdev->dev, res->start, 919 mem = devm_request_mem_region(&pdev->dev, res->start,
920 res->end - res->start + 1, res->name); 920 resource_size(res), res->name);
921 if (!mem) { 921 if (!mem) {
922 dev_err(&pdev->dev, "cannot request memory space\n"); 922 dev_err(&pdev->dev, "cannot request memory space\n");
923 ret = -ENXIO; 923 ret = -ENXIO;
@@ -945,7 +945,7 @@ static int ethoc_probe(struct platform_device *pdev)
945 priv->dma_alloc = 0; 945 priv->dma_alloc = 0;
946 946
947 priv->iobase = devm_ioremap_nocache(&pdev->dev, netdev->base_addr, 947 priv->iobase = devm_ioremap_nocache(&pdev->dev, netdev->base_addr,
948 mmio->end - mmio->start + 1); 948 resource_size(mmio));
949 if (!priv->iobase) { 949 if (!priv->iobase) {
950 dev_err(&pdev->dev, "cannot remap I/O memory space\n"); 950 dev_err(&pdev->dev, "cannot remap I/O memory space\n");
951 ret = -ENXIO; 951 ret = -ENXIO;
@@ -954,7 +954,7 @@ static int ethoc_probe(struct platform_device *pdev)
954 954
955 if (netdev->mem_end) { 955 if (netdev->mem_end) {
956 priv->membase = devm_ioremap_nocache(&pdev->dev, 956 priv->membase = devm_ioremap_nocache(&pdev->dev,
957 netdev->mem_start, mem->end - mem->start + 1); 957 netdev->mem_start, resource_size(mem));
958 if (!priv->membase) { 958 if (!priv->membase) {
959 dev_err(&pdev->dev, "cannot remap memory space\n"); 959 dev_err(&pdev->dev, "cannot remap memory space\n");
960 ret = -ENXIO; 960 ret = -ENXIO;