From patchwork Mon Mar 4 09:06:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 15220 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 948C123E4A for ; Mon, 4 Mar 2013 09:16:59 +0000 (UTC) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by fiordland.canonical.com (Postfix) with ESMTP id 53357A197C4 for ; Mon, 4 Mar 2013 09:16:59 +0000 (UTC) Received: by mail-ve0-f178.google.com with SMTP id db10so4438008veb.23 for ; Mon, 04 Mar 2013 01:16:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:x-forwarded-to:x-forwarded-for:delivered-to:x-received :received-spf:x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=WcRrdTBUkkm23HJp2+FDv3AjZhFBWYk1BDS9o4B0v9E=; b=nnpcdsdPsNfUy9ggrsNivITvbzZO7rfhScT0hO58LO2mvuPBd5VyCo8bMSl6Bi6XkJ SGKSp7tncpPbj6e4/e7tHz0FxeYtV+ghkW2feP6WRPAgiahO229WtLo9qnFhEHw48HYF Mgx/BaVq2COA2qjDn5Xi2GoJrg2Lw2XLmxnX2H2DV5b4c127ykUSZ9uklzBeVOhp5ZvA EjMT8i5XVthszmEqWN+HNsw7kG/qGAKMOf7Wso2v3smCvj3GmJa2w9Wb4alRoG9y3bpM /4HiTT4y/HbfiNt0I5VTNUBtS4/oXTIF4Lkfwa3pGXxI5dFJaAS0I3A7BkZDeAdNSM1G GjOw== X-Received: by 10.52.93.235 with SMTP id cx11mr6323214vdb.51.1362388618752; Mon, 04 Mar 2013 01:16:58 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.58.127.98 with SMTP id nf2csp46248veb; Mon, 4 Mar 2013 01:16:58 -0800 (PST) X-Received: by 10.66.122.4 with SMTP id lo4mr30922893pab.114.1362388617715; Mon, 04 Mar 2013 01:16:57 -0800 (PST) Received: from mail-pb0-f53.google.com (mail-pb0-f53.google.com [209.85.160.53]) by mx.google.com with ESMTPS id g3si16105818paw.165.2013.03.04.01.16.57 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 04 Mar 2013 01:16:57 -0800 (PST) Received-SPF: neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.53; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.53 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f53.google.com with SMTP id un1so2972897pbc.12 for ; Mon, 04 Mar 2013 01:16:57 -0800 (PST) X-Received: by 10.68.252.134 with SMTP id zs6mr27570518pbc.66.1362388617155; Mon, 04 Mar 2013 01:16:57 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id rd1sm21695151pbc.19.2013.03.04.01.16.53 (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 04 Mar 2013 01:16:56 -0800 (PST) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: vinod.koul@intel.com, sachin.kamat@linaro.org, patches@linaro.org, thierry.reding@avionic-design.de Subject: [PATCH Resend] dma: pl330: Convert to devm_ioremap_resource() Date: Mon, 4 Mar 2013 14:36:27 +0530 Message-Id: <1362387987-26718-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQlaPsZDi2UbCThGN32MPscX0s6W9vB+UfRxl3yMZras5L1xiloKxI40Oc51OgL2rWQGHf9k 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/dma/pl330.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 7181531..10005ec 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -26,6 +26,7 @@ #include #include #include +#include #include "dmaengine.h" #define PL330_MAX_CHAN 8 @@ -2904,9 +2905,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) pi->mcbufsz = pdat ? pdat->mcbuf_sz : 0; res = &adev->res; - pi->base = devm_request_and_ioremap(&adev->dev, res); - if (!pi->base) - return -ENXIO; + pi->base = devm_ioremap_resource(&adev->dev, res); + if (IS_ERR(pi->base)) + return PTR_ERR(pi->base); amba_set_drvdata(adev, pdmac);