[PATCH net-next] net: use pdev instead of OF funcs
Francois Romieu
romieu at fr.zoreil.com
Mon Nov 11 03:37:47 AEDT 2024
Rosen Penev <rosenp at gmail.com> :
> np here is ofdev->dev.of_node. Better to use the proper functions as
> there's no use of children or anything else.
>
> Signed-off-by: Rosen Penev <rosenp at gmail.com>
> ---
[...]
> diff --git a/drivers/net/ethernet/via/via-rhine.c b/drivers/net/ethernet/via/via-rhine.c
> index 894911f3d560..f079242c33e2 100644
> --- a/drivers/net/ethernet/via/via-rhine.c
> +++ b/drivers/net/ethernet/via/via-rhine.c
> @@ -1127,7 +1127,7 @@ static int rhine_init_one_platform(struct platform_device *pdev)
> if (IS_ERR(ioaddr))
> return PTR_ERR(ioaddr);
>
> - irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> + irq = platform_get_irq(pdev, 0);
> if (!irq)
> return -EINVAL;
>
> diff --git a/drivers/net/ethernet/via/via-velocity.c b/drivers/net/ethernet/via/via-velocity.c
> index dd4a07c97eee..4aac9599c14d 100644
> --- a/drivers/net/ethernet/via/via-velocity.c
> +++ b/drivers/net/ethernet/via/via-velocity.c
> @@ -2950,7 +2950,7 @@ static int velocity_platform_probe(struct platform_device *pdev)
> if (!info)
> return -EINVAL;
>
> - irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
> + irq = platform_get_irq(pdev, 0);
> if (!irq)
> return -EINVAL;
>
The change makes sense. However neither the description nor the commit message
really match here.
--
Ueimor
More information about the Linuxppc-dev
mailing list