|
@@ -1135,7 +1135,7 @@ static int korina_probe(struct platform_device *pdev)
|
|
|
|
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs");
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_regs");
|
|
dev->base_addr = r->start;
|
|
dev->base_addr = r->start;
|
|
- lp->eth_regs = ioremap_nocache(r->start, r->end - r->start);
|
|
|
|
|
|
+ lp->eth_regs = ioremap_nocache(r->start, resource_size(r));
|
|
if (!lp->eth_regs) {
|
|
if (!lp->eth_regs) {
|
|
printk(KERN_ERR DRV_NAME ": cannot remap registers\n");
|
|
printk(KERN_ERR DRV_NAME ": cannot remap registers\n");
|
|
rc = -ENXIO;
|
|
rc = -ENXIO;
|
|
@@ -1143,7 +1143,7 @@ static int korina_probe(struct platform_device *pdev)
|
|
}
|
|
}
|
|
|
|
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_rx");
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_rx");
|
|
- lp->rx_dma_regs = ioremap_nocache(r->start, r->end - r->start);
|
|
|
|
|
|
+ lp->rx_dma_regs = ioremap_nocache(r->start, resource_size(r));
|
|
if (!lp->rx_dma_regs) {
|
|
if (!lp->rx_dma_regs) {
|
|
printk(KERN_ERR DRV_NAME ": cannot remap Rx DMA registers\n");
|
|
printk(KERN_ERR DRV_NAME ": cannot remap Rx DMA registers\n");
|
|
rc = -ENXIO;
|
|
rc = -ENXIO;
|
|
@@ -1151,7 +1151,7 @@ static int korina_probe(struct platform_device *pdev)
|
|
}
|
|
}
|
|
|
|
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_tx");
|
|
r = platform_get_resource_byname(pdev, IORESOURCE_MEM, "korina_dma_tx");
|
|
- lp->tx_dma_regs = ioremap_nocache(r->start, r->end - r->start);
|
|
|
|
|
|
+ lp->tx_dma_regs = ioremap_nocache(r->start, resource_size(r));
|
|
if (!lp->tx_dma_regs) {
|
|
if (!lp->tx_dma_regs) {
|
|
printk(KERN_ERR DRV_NAME ": cannot remap Tx DMA registers\n");
|
|
printk(KERN_ERR DRV_NAME ": cannot remap Tx DMA registers\n");
|
|
rc = -ENXIO;
|
|
rc = -ENXIO;
|