Re: [PATCHv2 net-next 1/9] net: smsc911x: use devm_platform_ioremap_resource
From: Andrew Lunn
Date: Tue Oct 01 2024 - 18:23:16 EST
> @@ -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