From patchwork Mon Jun 17 09:16:13 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 17945 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gh0-f199.google.com (mail-gh0-f199.google.com [209.85.160.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2E10123971 for ; Mon, 17 Jun 2013 09:31:03 +0000 (UTC) Received: by mail-gh0-f199.google.com with SMTP id g14sf3151152ghb.10 for ; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-beenthere:x-forwarded-to:x-forwarded-for :delivered-to:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-google-group-id:list-post:list-help:list-archive:list-unsubscribe; bh=j/h+n2bCtA7vCNAPBWCMqwNQkcB7MRINEp0crN4hCkk=; b=TtzqrQZ8DWJAfRZ6H0XvArme2G96hzu9ghnSxFPEmyvIRlfKYg+rFm2CXnGPzaXEP7 bO2RtCTvuI2N6DWH3R7Tab9dlTjvXHTduScDGh9VtaF0Zw2PZ2M6NfyzV1wk6zNEVcTK 7ixmAqLNYxVS2fhfBGxvjwin+T/+jytHAfgeJoorlEzZCbD27h5qYWlhaK4CzE6a2oZO pJX4f25FxvPhQxD5S4tSVpTpEkRxh5JKZFhCzwZ5dvoruirJFddRbKmLhulh1LE1rI8Z 7eGBMj3eWlhZiHDAwx+5Gv0/i4WfropHOsj0byh6xzzwmgmrUotRfaup4Wf/InLkiQt4 252Q== X-Received: by 10.224.215.68 with SMTP id hd4mr7631663qab.5.1371461462794; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.71.210 with SMTP id x18ls1071013qeu.85.gmail; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) X-Received: by 10.58.145.97 with SMTP id st1mr3215709veb.71.1371461462671; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) Received: from mail-ve0-x22e.google.com (mail-ve0-x22e.google.com [2607:f8b0:400c:c01::22e]) by mx.google.com with ESMTPS id xb6si3810915vdb.3.2013.06.17.02.31.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 02:31:02 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c01::22e is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c01::22e; Received: by mail-ve0-f174.google.com with SMTP id oz10so1880669veb.5 for ; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) X-Received: by 10.220.53.7 with SMTP id k7mr4163717vcg.52.1371461462594; Mon, 17 Jun 2013 02:31:02 -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.58.165.8 with SMTP id yu8csp27134veb; Mon, 17 Jun 2013 02:31:02 -0700 (PDT) X-Received: by 10.68.4.9 with SMTP id g9mr12320171pbg.217.1371461461406; Mon, 17 Jun 2013 02:31:01 -0700 (PDT) Received: from mail-pb0-x231.google.com (mail-pb0-x231.google.com [2607:f8b0:400e:c01::231]) by mx.google.com with ESMTPS id wu4si5946969pbc.108.2013.06.17.02.31.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 02:31:01 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::231 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=2607:f8b0:400e:c01::231; Received: by mail-pb0-f49.google.com with SMTP id jt11so2567348pbb.22 for ; Mon, 17 Jun 2013 02:31:01 -0700 (PDT) X-Received: by 10.66.122.68 with SMTP id lq4mr11978461pab.78.1371461460903; Mon, 17 Jun 2013 02:31:00 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id xl3sm12165282pbb.17.2013.06.17.02.30.57 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Jun 2013 02:31:00 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: thierry.reding@gmail.com, patches@linaro.org, sachin.kamat@linaro.org, linux-pci@vger.kernel.org, Bjorn Helgaas Subject: [PATCH V2 6/6] pci: mvebu: Convert to use devm_ioremap_resource Date: Mon, 17 Jun 2013 14:46:13 +0530 Message-Id: <1371460573-30004-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370864113-17895-14-git-send-email-tushar.behera@linaro.org> References: <1370864113-17895-14-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnpPvTtnI7FZcutxJKWs4+/HJ9SN3BJMhqu+bUYHWt9kwJ3liQPKe8tDCus9hhmA9/f4Enh X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c01::22e 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: , Commit 75096579c3ac ("lib: devres: Introduce devm_ioremap_resource()") introduced devm_ioremap_resource() and deprecated the use of devm_request_and_ioremap(). While at it, modify mvebu_pcie_map_registers() to propagate error code. Signed-off-by: Tushar Behera CC: linux-pci@vger.kernel.org CC: Bjorn Helgaas Acked-by: Bjorn Helgaas Acked-by: Ezequiel Garcia A --- Changes for V2: * Return proper error code in mvebu_pcie_map_registers. drivers/pci/host/pci-mvebu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 13a633b..8fc2a82 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -750,9 +750,9 @@ mvebu_pcie_map_registers(struct platform_device *pdev, ret = of_address_to_resource(np, 0, ®s); if (ret) - return NULL; + return ERR_PTR(ret); - return devm_request_and_ioremap(&pdev->dev, ®s); + return devm_ioremap_resource(&pdev->dev, ®s); } static int __init mvebu_pcie_probe(struct platform_device *pdev) @@ -842,9 +842,10 @@ static int __init mvebu_pcie_probe(struct platform_device *pdev) continue; port->base = mvebu_pcie_map_registers(pdev, child, port); - if (!port->base) { + if (IS_ERR(port->base)) { dev_err(&pdev->dev, "PCIe%d.%d: cannot map registers\n", port->port, port->lane); + port->base = NULL; continue; }