diff options
author | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-21 06:09:07 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-02-06 09:33:04 -0200 |
commit | f23999eccb5f1b6ec858279670307b5b1abe887a (patch) | |
tree | caf2bd0a716fbb3cfd3af1ea13b5efbf39a5886b /drivers/media/platform/s5p-fimc/mipi-csis.c | |
parent | 7b34be71db533f3e0cf93d53cf62d036cdb5418a (diff) | |
download | talos-obmc-linux-f23999eccb5f1b6ec858279670307b5b1abe887a.tar.gz talos-obmc-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/s5p-fimc/mipi-csis.c')
-rw-r--r-- | drivers/media/platform/s5p-fimc/mipi-csis.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/media/platform/s5p-fimc/mipi-csis.c b/drivers/media/platform/s5p-fimc/mipi-csis.c index 613482fd74a9..1cc6501c213f 100644 --- a/drivers/media/platform/s5p-fimc/mipi-csis.c +++ b/drivers/media/platform/s5p-fimc/mipi-csis.c @@ -733,11 +733,9 @@ static int s5pcsis_probe(struct platform_device *pdev) } mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - state->regs = devm_request_and_ioremap(&pdev->dev, mem_res); - if (state->regs == NULL) { - dev_err(&pdev->dev, "Failed to request and remap io memory\n"); - return -ENXIO; - } + state->regs = devm_ioremap_resource(&pdev->dev, mem_res); + if (IS_ERR(state->regs)) + return PTR_ERR(state->regs); state->irq = platform_get_irq(pdev, 0); if (state->irq < 0) { |