diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 11:09:12 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-25 12:21:47 -0800 |
commit | b0de774c6334dccdcd43a7ef46155a1f3a52a954 (patch) | |
tree | d845a8ea2c8f5d556591829ec1829f216ad0cbb1 /drivers/mtd/nand/s3c2410.c | |
parent | a3e2cd7f24ba7521169943ace3d14b567487ea29 (diff) |
mtd: Convert to devm_ioremap_resource()
Convert all uses of devm_request_and_ioremap() to the newly introduced
devm_ioremap_resource() which provides more consistent error handling.
devm_ioremap_resource() provides its own error messages so all explicit
error messages can be removed from the failure code paths.
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/mtd/nand/s3c2410.c')
-rw-r--r-- | drivers/mtd/nand/s3c2410.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c index df954b4dcba2..d65afd23e171 100644 --- a/drivers/mtd/nand/s3c2410.c +++ b/drivers/mtd/nand/s3c2410.c @@ -952,10 +952,9 @@ static int s3c24xx_nand_probe(struct platform_device *pdev) info->platform = plat; info->cpu_type = cpu_type; - info->regs = devm_request_and_ioremap(&pdev->dev, res); - if (info->regs == NULL) { - dev_err(&pdev->dev, "cannot reserve register region\n"); - err = -EIO; + info->regs = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(info->regs)) { + err = PTR_ERR(info->regs); goto exit_error; } |