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: 3120171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C579EBF924 for ; Thu, 31 Oct 2013 11:10:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AAC6B2042C for ; Thu, 31 Oct 2013 11:10:55 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 741642042A for ; Thu, 31 Oct 2013 11:10:54 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbq8y-0006SR-GJ; Thu, 31 Oct 2013 11:10:28 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbq8n-0005Z7-GW; Thu, 31 Oct 2013 11:10:17 +0000 Received: from mail-pd0-f175.google.com ([209.85.192.175]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vbq8Z-0005XA-Ut for linux-arm-kernel@lists.infradead.org; Thu, 31 Oct 2013 11:10:05 +0000 Received: by mail-pd0-f175.google.com with SMTP id g10so2207154pdj.6 for ; Thu, 31 Oct 2013 04:09:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=FDEsj+9Xqm7m9i9YV8KINIBgixuhlafdB/9UrfDijJc=; b=XTJ9EP9sHmWmPoU5OPF67+8VS3cUJN1KQXxf3fEbwDlAGBQcEatrp8eAa/Lw1AQTND /Dg4UHlIC6Rhqy+Fon1+xOEmfst2EU2lTTgg6sZOMNnoDE4DNWFvrLWOE8PxGHSm9qDt ZfDE4gixYKB5Bl8Sfimx5TNB0PQ7IBSaL00vNF+e/qYv7Ucw1zSReE+NiI3aXXGAuI01 EFn6aX6JZKm9TO/Dtg6DJHe24M4fCfPC1bZ2OB/kYFMaA14W7YRnLqxgSrwacpJocQc6 7hJHAOOMwbLG6Rl8VrKo3b4tVKLf3ufJRSVDNvwYkmeaGgydtnjOL7an6N9RgNiB0ksO +xeQ== X-Gm-Message-State: ALoCoQkageYfM1jRxeUABCu+hLxf4h0/NDZXV5gq/zmEUCaOMfiV795U4cDyY87B4UuP01FoagQQ 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 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-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131031_071004_149331_A8488CED X-CRM114-Status: UNSURE ( 9.68 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -1.9 (-) Cc: iommu@lists.linux-foundation.org, Will Deacon , Joerg Roedel , linux-arm-kernel@lists.infradead.org, patches@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)) {