lkml.org 
[lkml]   [2023]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v1 20/43] net: cirrus: add DT support for Cirrus EP93xx
Thu, Jun 01, 2023 at 08:45:25AM +0300, Nikita Shubin kirjoitti:
> - find register range from the device tree
> - get "copy_addr" from the device tree
> - get phy_id from the device tree

...

> -#include <linux/platform_data/eth-ep93xx.h>
> #include <linux/reboot.h>
> +#include <linux/platform_data/eth-ep93xx.h>

Stray change.

...

> mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> irq = platform_get_irq(pdev, 0);
> if (!mem || irq < 0)
> return -ENXIO;
>
> - dev = ep93xx_dev_alloc(data);
> + base_addr = ioremap(mem->start, resource_size(mem));
> + if (!base_addr) {
> + dev_err(&pdev->dev, "Failed to ioremap ethernet registers\n");
> + return -EIO;
> + }

Why not switching to devm_platform_ioremap_resource()?

...

> + if (of_property_read_u32(np, "reg", &phy_id)) {
> + dev_err(&pdev->dev, "Failed to locate \"phy_id\"\n");
> + return -ENOENT;

return dev_err_probe(...); ?
> + }

--
With Best Regards,
Andy Shevchenko


\
 
 \ /
  Last update: 2023-06-03 22:31    [W:0.926 / U:0.540 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site