diff mbox series

[net-next:,v4,4/8] net: mvpp2: initialize port fwnode pointer

Message ID 20230116173420.1278704-5-mw@semihalf.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series DSA: switch to fwnode_/device_ | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next, async
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 6 this patch: 6
netdev/cc_maintainers warning 3 maintainers not CCed: matthias.bgg@gmail.com linux-arm-kernel@lists.infradead.org linux-mediatek@lists.infradead.org
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 6 this patch: 6
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Marcin Wojtas Jan. 16, 2023, 5:34 p.m. UTC
As a preparation to switch the DSA subsystem from using
of_find_net_device_by_node() to its more generic fwnode_ equivalent,
and later to allow ACPI description, update the port's device structure
also with its fwnode pointer.

Signed-off-by: Marcin Wojtas <mw@semihalf.com>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andy Shevchenko Jan. 16, 2023, 6:01 p.m. UTC | #1
On Mon, Jan 16, 2023 at 06:34:16PM +0100, Marcin Wojtas wrote:
> As a preparation to switch the DSA subsystem from using
> of_find_net_device_by_node() to its more generic fwnode_ equivalent,
> and later to allow ACPI description, update the port's device structure
> also with its fwnode pointer.

I believe this patch worth to be submitted even before core of this series.
FWIW,
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

> Signed-off-by: Marcin Wojtas <mw@semihalf.com>
> ---
>  drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> index 5f89fcec07b1..a25e90791700 100644
> --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
> @@ -6884,7 +6884,7 @@ static int mvpp2_port_probe(struct platform_device *pdev,
>  	dev->min_mtu = ETH_MIN_MTU;
>  	/* 9704 == 9728 - 20 and rounding to 8 */
>  	dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
> -	dev->dev.of_node = port_node;
> +	device_set_node(&dev->dev, port_fwnode);
>  
>  	port->pcs_gmac.ops = &mvpp2_phylink_gmac_pcs_ops;
>  	port->pcs_xlg.ops = &mvpp2_phylink_xlg_pcs_ops;
> -- 
> 2.29.0
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
index 5f89fcec07b1..a25e90791700 100644
--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -6884,7 +6884,7 @@  static int mvpp2_port_probe(struct platform_device *pdev,
 	dev->min_mtu = ETH_MIN_MTU;
 	/* 9704 == 9728 - 20 and rounding to 8 */
 	dev->max_mtu = MVPP2_BM_JUMBO_PKT_SIZE;
-	dev->dev.of_node = port_node;
+	device_set_node(&dev->dev, port_fwnode);
 
 	port->pcs_gmac.ops = &mvpp2_phylink_gmac_pcs_ops;
 	port->pcs_xlg.ops = &mvpp2_phylink_xlg_pcs_ops;