From patchwork Mon Jun 10 11:35:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 17723 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-gg0-f197.google.com (mail-gg0-f197.google.com [209.85.161.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 170EF25DF9 for ; Mon, 10 Jun 2013 11:50:17 +0000 (UTC) Received: by mail-gg0-f197.google.com with SMTP id x14sf6125381ggx.0 for ; Mon, 10 Jun 2013 04:50:16 -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=+xIh7JpnoMN2kuwHTRDAx6O/k6sU0Ft9evdlGfHwQRU=; b=RtLA1r2U3ctwcv58+9gIbVsxMecJv4jFtqoscwMejTdh4U1jHRPOv1pBR7NJCaYCjq KYpL+WYzgi24gcvYuB93mtom4egpOKQfT9EhRw+H7sios0alwrvZUQhLkgXolwgac4UJ ZV2yX7DKghRukwAzswh0t1yz7yQpFJlJMVMf29vygbZ5wdWCmuWpo2qZKcn/6HbBnTsI olN3YznoCLSt8/946urc6WsByZJPhoUz/DZ550b9JJcGETzkz3hclq/AMSqwuTLM2KgW NNSiG/01yL147L89vEAod0lwnWrRQqZSArPq8dCuDVKFLIw/VeVZwYaLdkLmEWo2oe5M S7aA== X-Received: by 10.224.59.205 with SMTP id m13mr8293952qah.7.1370865016793; Mon, 10 Jun 2013 04:50:16 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.121.227 with SMTP id ln3ls612646qeb.0.gmail; Mon, 10 Jun 2013 04:50:16 -0700 (PDT) X-Received: by 10.52.24.167 with SMTP id v7mr4566123vdf.20.1370865016546; Mon, 10 Jun 2013 04:50:16 -0700 (PDT) Received: from mail-vb0-x22e.google.com (mail-vb0-x22e.google.com [2607:f8b0:400c:c02::22e]) by mx.google.com with ESMTPS id p20si4706405veh.12.2013.06.10.04.50.16 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:16 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c02::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:c02::22e; Received: by mail-vb0-f46.google.com with SMTP id 10so4260711vbe.33 for ; Mon, 10 Jun 2013 04:50:16 -0700 (PDT) X-Received: by 10.220.19.74 with SMTP id z10mr5373759vca.45.1370865016438; Mon, 10 Jun 2013 04:50:16 -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.221.10.206 with SMTP id pb14csp64967vcb; Mon, 10 Jun 2013 04:50:15 -0700 (PDT) X-Received: by 10.68.222.74 with SMTP id qk10mr9621043pbc.58.1370865015463; Mon, 10 Jun 2013 04:50:15 -0700 (PDT) Received: from mail-pb0-x232.google.com (mail-pb0-x232.google.com [2607:f8b0:400e:c01::232]) by mx.google.com with ESMTPS id sb1si4698850pbb.22.2013.06.10.04.50.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:15 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400e:c01::232 is neither permitted nor denied by best guess record for domain of tushar.behera@linaro.org) client-ip=2607:f8b0:400e:c01::232; Received: by mail-pb0-f50.google.com with SMTP id wz7so1558953pbc.23 for ; Mon, 10 Jun 2013 04:50:15 -0700 (PDT) X-Received: by 10.68.191.167 with SMTP id gz7mr9821550pbc.16.1370865014951; Mon, 10 Jun 2013 04:50:14 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id rn7sm10242037pbc.12.2013.06.10.04.50.10 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 10 Jun 2013 04:50:13 -0700 (PDT) From: Tushar Behera To: linux-kernel@vger.kernel.org Cc: thierry.reding@gmail.com, patches@linaro.org, netdev@vger.kernel.org, "David S. Miller" Subject: [PATCH 06/15] net: bcm63xx_enet: Convert to use devm_ioremap_resource Date: Mon, 10 Jun 2013 17:05:04 +0530 Message-Id: <1370864113-17895-7-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1370864113-17895-1-git-send-email-tushar.behera@linaro.org> References: <1370864113-17895-1-git-send-email-tushar.behera@linaro.org> X-Gm-Message-State: ALoCoQnSUcArYbly75Z09fRqTCjxSTC946cJMAI7Pvb6wZRAbzqRUslMfZfN03BhxcnHkyi4Ll+W X-Original-Sender: tushar.behera@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c02::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(). Signed-off-by: Tushar Behera CC: netdev@vger.kernel.org CC: "David S. Miller" --- * Not compile tested. drivers/net/ethernet/broadcom/bcm63xx_enet.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c index e46466c..d690308 100644 --- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c +++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c @@ -1641,9 +1641,9 @@ static int bcm_enet_probe(struct platform_device *pdev) if (ret) goto out; - priv->base = devm_request_and_ioremap(&pdev->dev, res_mem); - if (priv->base == NULL) { - ret = -ENOMEM; + priv->base = devm_ioremap_resource(&pdev->dev, res_mem); + if (IS_ERR(priv->base)) { + ret = PTR_ERR(priv->base); goto out; } @@ -1871,9 +1871,9 @@ static int bcm_enet_shared_probe(struct platform_device *pdev) if (!res) return -ENODEV; - bcm_enet_shared_base = devm_request_and_ioremap(&pdev->dev, res); - if (!bcm_enet_shared_base) - return -ENOMEM; + bcm_enet_shared_base = devm_ioremap_resource(&pdev->dev, res); + if (IS_ERR(bcm_enet_shared_base)) + return PTR_ERR(bcp_enet_shared_base); return 0; }