linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: exynos: Convert to devm_ioremap_resource()
@ 2013-03-27 20:28 Andrei Epure
  2013-03-27 23:52 ` Donghwa Lee
  0 siblings, 1 reply; 2+ messages in thread
From: Andrei Epure @ 2013-03-27 20:28 UTC (permalink / raw)
  To: inki.dae, dh09.lee, kyungmin.park, FlorianSchandinat
  Cc: linux-fbdev, linux-kernel, Andrei Epure

The new devm_ioremap_resource() provides its own error messages.
Patch found using coccinelle.

Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
---
 drivers/video/exynos/exynos_mipi_dsi.c |    7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
index fac7df6..dd5e5e9 100644
--- a/drivers/video/exynos/exynos_mipi_dsi.c
+++ b/drivers/video/exynos/exynos_mipi_dsi.c
@@ -384,10 +384,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;
 	}
 
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] video: exynos: Convert to devm_ioremap_resource()
  2013-03-27 20:28 [PATCH] video: exynos: Convert to devm_ioremap_resource() Andrei Epure
@ 2013-03-27 23:52 ` Donghwa Lee
  0 siblings, 0 replies; 2+ messages in thread
From: Donghwa Lee @ 2013-03-27 23:52 UTC (permalink / raw)
  To: Andrei Epure
  Cc: inki.dae, kyungmin.park, FlorianSchandinat, linux-fbdev, linux-kernel


Hi,

Please refer to the following link.

http://marc.info/?l=linux-fbdev&m=135963121130437&w=2

Best regard,
Donghwa Lee

On Thu, Mar 28, 2013 at 05:28, Andrei Epure wrote:
> The new devm_ioremap_resource() provides its own error messages.
> Patch found using coccinelle.
>
> Signed-off-by: Andrei Epure <epure.andrei@gmail.com>
> ---
>   drivers/video/exynos/exynos_mipi_dsi.c |    7 +++----
>   1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/video/exynos/exynos_mipi_dsi.c b/drivers/video/exynos/exynos_mipi_dsi.c
> index fac7df6..dd5e5e9 100644
> --- a/drivers/video/exynos/exynos_mipi_dsi.c
> +++ b/drivers/video/exynos/exynos_mipi_dsi.c
> @@ -384,10 +384,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;
>   	}
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-27 23:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-27 20:28 [PATCH] video: exynos: Convert to devm_ioremap_resource() Andrei Epure
2013-03-27 23:52 ` Donghwa Lee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).