From patchwork Thu Oct 31 11:08:05 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 21301 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DD7C520F2F for ; Thu, 31 Oct 2013 11:09:43 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id uy5sf8324181obc.7 for ; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=FDEsj+9Xqm7m9i9YV8KINIBgixuhlafdB/9UrfDijJc=; b=DnPJXV6eMEgSaeXWruZRTE9iUFTAU75ScPR8A36a8Vw11afVqLocH61CXFYEi0SGKc tS2N0CVIMRgKdFULsZOSFWQ8UF2B/a16lmsFMOKjJD+4KCZVXsCZZk3J1bFvuonbSp4q mxiYQ6CCQkqrvGmxRhfFQYKqEkSTeNT6cl8Id7Llno7iSqf5qme1Z3QS2zuDZdn7ftCc DYIcnlL2oysZkC7G8C2uQ0FjzRyIFbK+ajIUKozVuATdp+cKkVC8pP734KBuEX6YMit5 7gvzkaHzF/cUQtu9wkUnPx8SAmlKcdzDemdcezc0ZAfLHpk5v2eIov9Xp64kC4MQbZqO MZMQ== X-Gm-Message-State: ALoCoQmiZWSois69aNgNxcPETE3sxB+noK2kdbuMCex1/ux1122EGnGTBYlidu+EUC3oHZ/Nq0ay X-Received: by 10.182.43.137 with SMTP id w9mr839339obl.24.1383217783497; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.17.7 with SMTP id k7ls825866qed.96.gmail; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) X-Received: by 10.58.46.18 with SMTP id r18mr1534073vem.4.1383217783362; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) Received: from mail-vb0-f44.google.com (mail-vb0-f44.google.com [209.85.212.44]) by mx.google.com with ESMTPS id 1si662988vel.74.2013.10.31.04.09.43 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Oct 2013 04:09:43 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.44; Received: by mail-vb0-f44.google.com with SMTP id 11so1781817vbe.31 for ; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) X-Received: by 10.220.11.7 with SMTP id r7mr1533438vcr.12.1383217783261; Thu, 31 Oct 2013 04:09:43 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp352575vcz; Thu, 31 Oct 2013 04:09:42 -0700 (PDT) X-Received: by 10.68.134.98 with SMTP id pj2mr1279305pbb.110.1383217782564; Thu, 31 Oct 2013 04:09:42 -0700 (PDT) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by mx.google.com with ESMTPS id ba2si922936pbc.148.2013.10.31.04.09.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Oct 2013 04:09:42 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.192.172 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=209.85.192.172; Received: by mail-pd0-f172.google.com with SMTP id w10so2220248pde.17 for ; Thu, 31 Oct 2013 04:09:42 -0700 (PDT) X-Received: by 10.66.154.197 with SMTP id vq5mr1258174pab.155.1383217782015; Thu, 31 Oct 2013 04:09:42 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id hz10sm3446333pbc.36.2013.10.31.04.09.39 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 31 Oct 2013 04:09:41 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: patches@linaro.org, linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org, Will Deacon , Joerg Roedel Subject: [PATCH 3/5] iommu/arm-smmu: Use devm_ioremap_resource Date: Thu, 31 Oct 2013 16:38:05 +0530 Message-Id: <1383217687-12037-4-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1383217687-12037-1-git-send-email-tushar.behera@linaro.org> References: <1383217687-12037-1-git-send-email-tushar.behera@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.44 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , While at it, propagate the error code. Signed-off-by: Tushar Behera CC: linux-arm-kernel@lists.infradead.org CC: iommu@lists.linux-foundation.org CC: Will Deacon CC: Joerg Roedel --- drivers/iommu/arm-smmu.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index 2349d62..fe275b3 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1790,9 +1790,9 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev) } smmu->size = resource_size(res); - smmu->base = devm_request_and_ioremap(dev, res); - if (!smmu->base) - return -EADDRNOTAVAIL; + smmu->base = devm_ioremap_resource(dev, res); + if (IS_ERR(smmu->base)) + return PTR_ERR(smmu->base); if (of_property_read_u32(dev->of_node, "#global-interrupts", &smmu->num_global_irqs)) {