diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 13:09:07 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-06 15:33:04 +0400 |
commit | f23999eccb5f1b6ec858279670307b5b1abe887a (patch) | |
tree | caf2bd0a716fbb3cfd3af1ea13b5efbf39a5886b /drivers/media/platform/s3c-camif | |
parent | 7b34be71db533f3e0cf93d53cf62d036cdb5418a (diff) | |
download | linux-f23999eccb5f1b6ec858279670307b5b1abe887a.tar.xz |
[media] media: 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>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s3c-camif')
-rw-r--r-- | drivers/media/platform/s3c-camif/camif-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/s3c-camif/camif-core.c b/drivers/media/platform/s3c-camif/camif-core.c index 8f0ca02c29a9..0d0fab1a7b5e 100644 --- a/drivers/media/platform/s3c-camif/camif-core.c +++ b/drivers/media/platform/s3c-camif/camif-core.c @@ -434,11 +434,9 @@ static int s3c_camif_probe(struct platform_device *pdev) mres = platform_get_resource(pdev, IORESOURCE_MEM, 0); - camif->io_base = devm_request_and_ioremap(dev, mres); - if (!camif->io_base) { - dev_err(dev, "failed to obtain I/O memory\n"); - return -ENOENT; - } + camif->io_base = devm_ioremap_resource(dev, mres); + if (IS_ERR(camif->io_base)) + return PTR_ERR(camif->io_base); ret = camif_request_irqs(pdev, camif); if (ret < 0) |