* [PATCH net-next] net: w5100: Use devm_platform_get_and_ioremap_resource()
@ 2021-06-10 7:29 Yang Yingliang
2021-06-10 21:00 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Yang Yingliang @ 2021-06-10 7:29 UTC (permalink / raw)
To: linux-kernel, netdev; +Cc: davem, kuba
Use devm_platform_get_and_ioremap_resource() to simplify
code.
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
drivers/net/ethernet/wiznet/w5100.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/wiznet/w5100.c b/drivers/net/ethernet/wiznet/w5100.c
index ec5db481c9cd..811815f8cd3b 100644
--- a/drivers/net/ethernet/wiznet/w5100.c
+++ b/drivers/net/ethernet/wiznet/w5100.c
@@ -263,19 +263,14 @@ static int w5100_writebulk_direct(struct net_device *ndev, u32 addr,
static int w5100_mmio_init(struct net_device *ndev)
{
struct platform_device *pdev = to_platform_device(ndev->dev.parent);
- struct w5100_priv *priv = netdev_priv(ndev);
struct w5100_mmio_priv *mmio_priv = w5100_mmio_priv(ndev);
- struct resource *mem;
spin_lock_init(&mmio_priv->reg_lock);
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mmio_priv->base = devm_ioremap_resource(&pdev->dev, mem);
+ mmio_priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
if (IS_ERR(mmio_priv->base))
return PTR_ERR(mmio_priv->base);
- netdev_info(ndev, "at 0x%llx irq %d\n", (u64)mem->start, priv->irq);
-
return 0;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: w5100: Use devm_platform_get_and_ioremap_resource()
2021-06-10 7:29 [PATCH net-next] net: w5100: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
@ 2021-06-10 21:00 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-06-10 21:00 UTC (permalink / raw)
To: Yang Yingliang; +Cc: linux-kernel, netdev, davem, kuba
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
On Thu, 10 Jun 2021 15:29:33 +0800 you wrote:
> Use devm_platform_get_and_ioremap_resource() to simplify
> code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
> ---
> drivers/net/ethernet/wiznet/w5100.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
Here is the summary with links:
- [net-next] net: w5100: Use devm_platform_get_and_ioremap_resource()
https://git.kernel.org/netdev/net-next/c/0b462d017caf
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-06-10 21:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10 7:29 [PATCH net-next] net: w5100: Use devm_platform_get_and_ioremap_resource() Yang Yingliang
2021-06-10 21:00 ` patchwork-bot+netdevbpf
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.