Skip to content

Commit

Permalink
drivers/video/exynos/exynos_mipi_dsi.c: convert to devm_ioremap_resou…
Browse files Browse the repository at this point in the history
…rce()

Use the newly introduced devm_ioremap_resource() instead of
devm_request_and_ioremap() 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: Sachin Kamat <[email protected]>
Cc: Donghwa Lee <[email protected]>
Cc: Florian Tobias Schandinat <[email protected]>
Reviewed-by: Thierry Reding <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Sachin Kamat authored and torvalds committed Apr 29, 2013
1 parent 68a2d20 commit 6637eca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/video/exynos/exynos_mipi_dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <linux/notifier.h>
#include <linux/regulator/consumer.h>
#include <linux/pm_runtime.h>
#include <linux/err.h>

#include <video/exynos_mipi_dsim.h>

Expand Down Expand Up @@ -382,10 +383,9 @@ static int exynos_mipi_dsi_probe(struct platform_device *pdev)

res = platform_get_resource(pdev, IORESOURCE_MEM, 0);

dsim->reg_base = devm_request_and_ioremap(&pdev->dev, res);
if (!dsim->reg_base) {
dev_err(&pdev->dev, "failed to remap io region\n");
ret = -ENOMEM;
dsim->reg_base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(dsim->reg_base)) {
ret = PTR_ERR(dsim->reg_base);
goto error;
}

Expand Down

0 comments on commit 6637eca

Please sign in to comment.