diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 10:09:07 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-06 12:33:04 +0100 |
commit | f23999eccb5f1b6ec858279670307b5b1abe887a (patch) | |
tree | caf2bd0a716fbb3cfd3af1ea13b5efbf39a5886b /drivers/media/platform/exynos-gsc | |
parent | [media] use IS_ENABLED() macro (diff) | |
download | linux-f23999eccb5f1b6ec858279670307b5b1abe887a.tar.xz linux-f23999eccb5f1b6ec858279670307b5b1abe887a.zip |
[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/exynos-gsc')
-rw-r--r-- | drivers/media/platform/exynos-gsc/gsc-core.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 99b841d2f8fc..82d9f6ac12f3 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1099,11 +1099,9 @@ static int gsc_probe(struct platform_device *pdev) gsc->clock = ERR_PTR(-EINVAL); res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gsc->regs = devm_request_and_ioremap(dev, res); - if (!gsc->regs) { - dev_err(dev, "failed to map registers\n"); - return -ENOENT; - } + gsc->regs = devm_ioremap_resource(dev, res); + if (IS_ERR(gsc->regs)) + return PTR_ERR(gsc->regs); res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); if (!res) { |