diff options
Diffstat (limited to 'drivers/net/davinci_emac.c')
-rw-r--r-- | drivers/net/davinci_emac.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/davinci_emac.c b/drivers/net/davinci_emac.c index acef7e96c9fd..3f451e4d8361 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -1822,7 +1822,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
1822 | } | 1822 | } |
1823 | 1823 | ||
1824 | priv->emac_base_phys = res->start + pdata->ctrl_reg_offset; | 1824 | priv->emac_base_phys = res->start + pdata->ctrl_reg_offset; |
1825 | size = res->end - res->start + 1; | 1825 | size = resource_size(res); |
1826 | if (!request_mem_region(res->start, size, ndev->name)) { | 1826 | if (!request_mem_region(res->start, size, ndev->name)) { |
1827 | dev_err(&pdev->dev, "failed request_mem_region() for regs\n"); | 1827 | dev_err(&pdev->dev, "failed request_mem_region() for regs\n"); |
1828 | rc = -ENXIO; | 1828 | rc = -ENXIO; |
@@ -1927,7 +1927,7 @@ no_irq_res: | |||
1927 | cpdma_ctlr_destroy(priv->dma); | 1927 | cpdma_ctlr_destroy(priv->dma); |
1928 | no_dma: | 1928 | no_dma: |
1929 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1929 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1930 | release_mem_region(res->start, res->end - res->start + 1); | 1930 | release_mem_region(res->start, resource_size(res)); |
1931 | iounmap(priv->remap_addr); | 1931 | iounmap(priv->remap_addr); |
1932 | 1932 | ||
1933 | probe_quit: | 1933 | probe_quit: |
@@ -1961,7 +1961,7 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev) | |||
1961 | cpdma_chan_destroy(priv->rxchan); | 1961 | cpdma_chan_destroy(priv->rxchan); |
1962 | cpdma_ctlr_destroy(priv->dma); | 1962 | cpdma_ctlr_destroy(priv->dma); |
1963 | 1963 | ||
1964 | release_mem_region(res->start, res->end - res->start + 1); | 1964 | release_mem_region(res->start, resource_size(res)); |
1965 | 1965 | ||
1966 | unregister_netdev(ndev); | 1966 | unregister_netdev(ndev); |
1967 | iounmap(priv->remap_addr); | 1967 | iounmap(priv->remap_addr); |