From: Laurent Navet <laurent.navet@gmail.com>
To: davem@davemloft.net
Cc: cernekee@gmail.com, jogo@openwrt.org, joe@perches.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
gregkh@linuxfoundation.org,
Laurent Navet <laurent.navet@gmail.com>
Subject: [PATCH] drivers: net: ethernet: broadcom: bcm63xx: use devm_ioremap_resource()
Date: Sun, 12 May 2013 17:56:05 +0200 [thread overview]
Message-ID: <1368374165-3228-1-git-send-email-laurent.navet@gmail.com> (raw)
Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.
Found with coccicheck and this semantic patch:
scripts/coccinelle/api/devm_ioremap_resource.cocci
Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
---
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index 0b3e23e..9de4217 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;
}
--
1.7.10.4
next reply other threads:[~2013-05-12 15:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-12 15:56 Laurent Navet [this message]
2013-05-12 15:53 ` [PATCH] drivers: net: ethernet: broadcom: bcm63xx: use devm_ioremap_resource() Laurent Navet
2013-05-12 18:38 ` Sergei Shtylyov
-- strict thread matches above, loose matches on Subject: below --
2013-05-13 13:53 Laurent Navet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1368374165-3228-1-git-send-email-laurent.navet@gmail.com \
--to=laurent.navet@gmail.com \
--cc=cernekee@gmail.com \
--cc=davem@davemloft.net \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=jogo@openwrt.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).