From patchwork Mon Mar 4 08:15:19 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2211371 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 05DB6DF2F2 for ; Mon, 4 Mar 2013 08:25:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755503Ab3CDIZv (ORCPT ); Mon, 4 Mar 2013 03:25:51 -0500 Received: from mail-pa0-f51.google.com ([209.85.220.51]:44328 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755457Ab3CDIZu (ORCPT ); Mon, 4 Mar 2013 03:25:50 -0500 Received: by mail-pa0-f51.google.com with SMTP id hz1so3015079pad.24 for ; Mon, 04 Mar 2013 00:25:50 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:x-gm-message-state; bh=/f8s4Q3f4dIUV0ViAkJEmwtGOgYj8PaWxBq4zcjF9+A=; b=ehIp/JhBmsFREOIUBD5VqYYTzp+KUQxxG1VzWOWh/HMlmBhHM89nYDQKfcrFm8uom9 X7Q88Jhk/STrVrTLm6QqAxNzfP0JfzuE2ePNJohP2bfWRiGtw2JYDNRlZZrpP7oUiGJj AOvII14GZ9f5xOBfNoB12dpQfA9qmcrR/6DNmnKPMYIpOqdLEsTfkKR/7CxNITlXeILa WmIVx1lC8hyMc5gz33Ij0PBeqpBFHnNbMA5YZfJxrap644mzhDaCe+Yh93x5bYMMWeLe z0Y0v+iovRXtcGC+/1KgPK8GpjQQhfb7LF6dSBr1iRKBKCbUjIKjsZ6xLa5rlNzgr53e mfTQ== X-Received: by 10.67.4.226 with SMTP id ch2mr31223786pad.152.1362385550331; Mon, 04 Mar 2013 00:25:50 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id 1sm21552973pbg.18.2013.03.04.00.25.47 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 00:25:49 -0800 (PST) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: g.liakhovetski@gmx.de, sachin.kamat@linaro.org, thierry.reding@avionic-design.de Subject: [PATCH 2/4] [media] soc_camera/pxa_camera: Convert to devm_ioremap_resource() Date: Mon, 4 Mar 2013 13:45:19 +0530 Message-Id: <1362384921-7344-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1362384921-7344-1-git-send-email-sachin.kamat@linaro.org> References: <1362384921-7344-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQllQcw4yTV7gaT3kpGjZfByjtcFd8ZAJbwPr9vKgIKf4R2y65w0yG3Rxg+d8mSLf0t8+BUp Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat Reviewed-by: Thierry Reding --- drivers/media/platform/soc_camera/pxa_camera.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c index 395e2e0..42abbce 100644 --- a/drivers/media/platform/soc_camera/pxa_camera.c +++ b/drivers/media/platform/soc_camera/pxa_camera.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -1710,9 +1711,10 @@ static int pxa_camera_probe(struct platform_device *pdev) /* * Request the regions. */ - base = devm_request_and_ioremap(&pdev->dev, res); - if (!base) - return -ENOMEM; + base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(base)) + return PTR_ERR(base); + pcdev->irq = irq; pcdev->base = base;