From patchwork Thu Oct 10 14:54:34 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 20941 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-vb0-f71.google.com (mail-vb0-f71.google.com [209.85.212.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6AD012611D for ; Thu, 10 Oct 2013 14:54:41 +0000 (UTC) Received: by mail-vb0-f71.google.com with SMTP id g17sf4718974vbg.10 for ; Thu, 10 Oct 2013 07:54:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=j8sxDvQqS6uOW4dp7d7ZpASxh099sgIdB2GG31GOJ/E=; b=lxYyNZGyv3arTgr1Z0GPGlp4qRV9Wtgp0q7N/HgpYA4K99vyOfjI45/p22OU29fQt1 DBI/i9BUGyn/YnCeHyLKbSppiDabCwv1nds/bqwN3F6zQf1AyyhVoucfluM/Pza6bWRT PfVM6yGcW/EwR/ZEv+f+jKn1b1FWpGwFC6WvXFp542sRu++lXZJF+eo9VoJid9c0Z5RN +i/08uuPZwV/1lrDlmZKGn9R160NhAxhhc0uUr8e12+Ek+PAYGEwltHoeE8jZT93TnYB gby30jNqHYZYQ2k7ReiIjuIw2Cy8giorwhaa76M3DkIx37D5PLXpjCkA7hYA5oI+AwON uo1Q== X-Received: by 10.236.0.232 with SMTP id 68mr11911959yhb.16.1381416880649; Thu, 10 Oct 2013 07:54:40 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.109.102 with SMTP id hr6ls1084913qeb.13.gmail; Thu, 10 Oct 2013 07:54:40 -0700 (PDT) X-Received: by 10.52.34.109 with SMTP id y13mr12250208vdi.8.1381416880448; Thu, 10 Oct 2013 07:54:40 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id sc5si14376469vdc.61.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:54:40 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id ib11so1766503vcb.0 for ; Thu, 10 Oct 2013 07:54:40 -0700 (PDT) X-Gm-Message-State: ALoCoQlhrOe3s+szPUJnARvyzyqmRNUJ3bmBjHRbS3ygQEAp4aPWDz9YhGvyIB19cij2MqkUDnWo X-Received: by 10.52.122.15 with SMTP id lo15mr6471177vdb.115.1381416880336; Thu, 10 Oct 2013 07:54:40 -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 u4csp382214vcz; Thu, 10 Oct 2013 07:54:39 -0700 (PDT) X-Received: by 10.180.39.212 with SMTP id r20mr8162999wik.13.1381416879109; Thu, 10 Oct 2013 07:54:39 -0700 (PDT) Received: from mail-we0-f174.google.com (mail-we0-f174.google.com [74.125.82.174]) by mx.google.com with ESMTPS id op2si18746634wjc.59.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Oct 2013 07:54:39 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.174 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.174; Received: by mail-we0-f174.google.com with SMTP id u56so2660441wes.19 for ; Thu, 10 Oct 2013 07:54:38 -0700 (PDT) X-Received: by 10.181.11.163 with SMTP id ej3mr8000211wid.47.1381416878460; Thu, 10 Oct 2013 07:54:38 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id k4sm22531393wic.0.1969.12.31.16.00.00 (version=TLSv1.2 cipher=AES128-GCM-SHA256 bits=128/128); Thu, 10 Oct 2013 07:54:37 -0700 (PDT) From: Linus Walleij To: linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, Mark Rutland , Linus Walleij Subject: [PATCH] ARM: integrator: use devm_ioremap() to remap CM Date: Thu, 10 Oct 2013 16:54:34 +0200 Message-Id: <1381416874-4858-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.169 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: , In the PCIv3 driver, use devm_ioremap() instead of just ioremap() when remapping the system controller in the PCIv3 driver, so the mapping will be automatically released on probe failure. Reported-by: Mark Rutland Signed-off-by: Linus Walleij --- arch/arm/mach-integrator/pci_v3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/mach-integrator/pci_v3.c b/arch/arm/mach-integrator/pci_v3.c index ce8d0ca..c9c5a33 100644 --- a/arch/arm/mach-integrator/pci_v3.c +++ b/arch/arm/mach-integrator/pci_v3.c @@ -842,7 +842,7 @@ static int __init pci_v3_probe(struct platform_device *pdev) int irq, ret; /* Remap the Integrator system controller */ - ap_syscon_base = ioremap(INTEGRATOR_SC_BASE, 0x100); + ap_syscon_base = devm_ioremap(&pdev->dev, INTEGRATOR_SC_BASE, 0x100); if (!ap_syscon_base) { dev_err(&pdev->dev, "unable to remap the AP syscon for PCIv3\n"); return -ENODEV;