Message ID | 1384964699-15134-4-git-send-email-ivan.khoronzhuk@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c index e904364..aa30708 100644 --- a/drivers/mtd/nand/davinci_nand.c +++ b/drivers/mtd/nand/davinci_nand.c @@ -638,9 +638,11 @@ static int __init nand_davinci_probe(struct platform_device *pdev) if (IS_ERR(vaddr)) return PTR_ERR(vaddr); - base = devm_ioremap_resource(&pdev->dev, res2); - if (IS_ERR(base)) - return PTR_ERR(base); + base = devm_ioremap(&pdev->dev, res2->start, resource_size(res2)); + if (!base) { + dev_err(&pdev->dev, "ioremap failed for resource %pR\n", res2); + return -EADDRNOTAVAIL; + } info->dev = &pdev->dev; info->base = base;