Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drivers/video/exynos/exynos_mipi_dsi.c: convert to devm_ioremap_resource()

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 <sachin.kamat@linaro.org>
Cc: Donghwa Lee <dh09.lee@samsung.com>
Cc: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Reviewed-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Sachin Kamat and committed by
Linus Torvalds
6637eca3 68a2d20b

+4 -4
+4 -4
drivers/video/exynos/exynos_mipi_dsi.c
··· 32 32 #include <linux/notifier.h> 33 33 #include <linux/regulator/consumer.h> 34 34 #include <linux/pm_runtime.h> 35 + #include <linux/err.h> 35 36 36 37 #include <video/exynos_mipi_dsim.h> 37 38 ··· 383 382 384 383 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 385 384 386 - dsim->reg_base = devm_request_and_ioremap(&pdev->dev, res); 387 - if (!dsim->reg_base) { 388 - dev_err(&pdev->dev, "failed to remap io region\n"); 389 - ret = -ENOMEM; 385 + dsim->reg_base = devm_ioremap_resource(&pdev->dev, res); 386 + if (IS_ERR(dsim->reg_base)) { 387 + ret = PTR_ERR(dsim->reg_base); 390 388 goto error; 391 389 } 392 390