diff options
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/atmel_nand.c | 4 | ||||
-rw-r--r-- | drivers/mtd/nand/bcm_umi_nand.c | 2 | ||||
-rw-r--r-- | drivers/mtd/nand/mpc5121_nfc.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c index 1b90fd56bef1..55da20ccc7a8 100644 --- a/drivers/mtd/nand/atmel_nand.c +++ b/drivers/mtd/nand/atmel_nand.c | |||
@@ -514,7 +514,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
514 | 514 | ||
515 | host->io_phys = (dma_addr_t)mem->start; | 515 | host->io_phys = (dma_addr_t)mem->start; |
516 | 516 | ||
517 | host->io_base = ioremap(mem->start, mem->end - mem->start + 1); | 517 | host->io_base = ioremap(mem->start, resource_size(mem)); |
518 | if (host->io_base == NULL) { | 518 | if (host->io_base == NULL) { |
519 | printk(KERN_ERR "atmel_nand: ioremap failed\n"); | 519 | printk(KERN_ERR "atmel_nand: ioremap failed\n"); |
520 | res = -EIO; | 520 | res = -EIO; |
@@ -548,7 +548,7 @@ static int __init atmel_nand_probe(struct platform_device *pdev) | |||
548 | if (no_ecc) | 548 | if (no_ecc) |
549 | nand_chip->ecc.mode = NAND_ECC_NONE; | 549 | nand_chip->ecc.mode = NAND_ECC_NONE; |
550 | if (hard_ecc && regs) { | 550 | if (hard_ecc && regs) { |
551 | host->ecc = ioremap(regs->start, regs->end - regs->start + 1); | 551 | host->ecc = ioremap(regs->start, resource_size(regs)); |
552 | if (host->ecc == NULL) { | 552 | if (host->ecc == NULL) { |
553 | printk(KERN_ERR "atmel_nand: ioremap failed\n"); | 553 | printk(KERN_ERR "atmel_nand: ioremap failed\n"); |
554 | res = -EIO; | 554 | res = -EIO; |
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c index 9ec280738a9a..8c569e454dc5 100644 --- a/drivers/mtd/nand/bcm_umi_nand.c +++ b/drivers/mtd/nand/bcm_umi_nand.c | |||
@@ -380,7 +380,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev) | |||
380 | return -ENXIO; | 380 | return -ENXIO; |
381 | 381 | ||
382 | /* map physical address */ | 382 | /* map physical address */ |
383 | bcm_umi_io_base = ioremap(r->start, r->end - r->start + 1); | 383 | bcm_umi_io_base = ioremap(r->start, resource_size(r)); |
384 | 384 | ||
385 | if (!bcm_umi_io_base) { | 385 | if (!bcm_umi_io_base) { |
386 | printk(KERN_ERR "ioremap to access BCM UMI NAND chip failed\n"); | 386 | printk(KERN_ERR "ioremap to access BCM UMI NAND chip failed\n"); |
diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 2f7c930872f9..eb1fbac63eb6 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c | |||
@@ -713,7 +713,7 @@ static int __devinit mpc5121_nfc_probe(struct platform_device *op) | |||
713 | } | 713 | } |
714 | 714 | ||
715 | regs_paddr = res.start; | 715 | regs_paddr = res.start; |
716 | regs_size = res.end - res.start + 1; | 716 | regs_size = resource_size(&res); |
717 | 717 | ||
718 | if (!devm_request_mem_region(dev, regs_paddr, regs_size, DRV_NAME)) { | 718 | if (!devm_request_mem_region(dev, regs_paddr, regs_size, DRV_NAME)) { |
719 | dev_err(dev, "Error requesting memory region!\n"); | 719 | dev_err(dev, "Error requesting memory region!\n"); |