[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40e8ad8e-cc37-45e7-a94c-094b1e0a3775@lunn.ch>
Date: Wed, 2 Oct 2024 00:22:46 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Rosen Penev <rosenp@...il.com>
Cc: netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
kuba@...nel.org, pabeni@...hat.com, linux-kernel@...r.kernel.org,
steve.glendinning@...well.net
Subject: Re: [PATCHv2 net-next 1/9] net: smsc911x: use
devm_platform_ioremap_resource
> @@ -2414,21 +2404,9 @@ static int smsc911x_drv_probe(struct platform_device *pdev)
> struct net_device *dev;
> struct smsc911x_data *pdata;
> struct smsc911x_platform_config *config = dev_get_platdata(&pdev->dev);
> - struct resource *res;
> - int res_size, irq;
> + int irq;
> int retval;
>
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM,
> - "smsc911x-memory");
> + pdata->ioaddr = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(pdata->ioaddr)) {
> + retval = PTR_ERR(pdata->ioaddr);
I would expect some sort of comment in the commit messages which
explains why resource "smsc911x-memory" is always resource 0.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists