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 dcc4a170b0f3..c35ba5fba8f6 100644 --- a/drivers/net/davinci_emac.c +++ b/drivers/net/davinci_emac.c | |||
@@ -1821,7 +1821,7 @@ static int __devinit davinci_emac_probe(struct platform_device *pdev) | |||
1821 | } | 1821 | } |
1822 | 1822 | ||
1823 | priv->emac_base_phys = res->start + pdata->ctrl_reg_offset; | 1823 | priv->emac_base_phys = res->start + pdata->ctrl_reg_offset; |
1824 | size = res->end - res->start + 1; | 1824 | size = resource_size(res); |
1825 | if (!request_mem_region(res->start, size, ndev->name)) { | 1825 | if (!request_mem_region(res->start, size, ndev->name)) { |
1826 | dev_err(&pdev->dev, "failed request_mem_region() for regs\n"); | 1826 | dev_err(&pdev->dev, "failed request_mem_region() for regs\n"); |
1827 | rc = -ENXIO; | 1827 | rc = -ENXIO; |
@@ -1926,7 +1926,7 @@ no_irq_res: | |||
1926 | cpdma_ctlr_destroy(priv->dma); | 1926 | cpdma_ctlr_destroy(priv->dma); |
1927 | no_dma: | 1927 | no_dma: |
1928 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1928 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1929 | release_mem_region(res->start, res->end - res->start + 1); | 1929 | release_mem_region(res->start, resource_size(res)); |
1930 | iounmap(priv->remap_addr); | 1930 | iounmap(priv->remap_addr); |
1931 | 1931 | ||
1932 | probe_quit: | 1932 | probe_quit: |
@@ -1960,7 +1960,7 @@ static int __devexit davinci_emac_remove(struct platform_device *pdev) | |||
1960 | cpdma_chan_destroy(priv->rxchan); | 1960 | cpdma_chan_destroy(priv->rxchan); |
1961 | cpdma_ctlr_destroy(priv->dma); | 1961 | cpdma_ctlr_destroy(priv->dma); |
1962 | 1962 | ||
1963 | release_mem_region(res->start, res->end - res->start + 1); | 1963 | release_mem_region(res->start, resource_size(res)); |
1964 | 1964 | ||
1965 | unregister_netdev(ndev); | 1965 | unregister_netdev(ndev); |
1966 | iounmap(priv->remap_addr); | 1966 | iounmap(priv->remap_addr); |