]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: stmmac: avoid passing pci_dev
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thu, 12 Mar 2026 12:13:52 +0000 (12:13 +0000)
committerJakub Kicinski <kuba@kernel.org>
Sat, 14 Mar 2026 16:42:58 +0000 (09:42 -0700)
commitf807b5b9b89eb9220d034115c272c312251cbcac
tree4e01cf7ef6e2190f2711657186fa0c5aaaae345e
parentf4ce4922df8d1c3417f4bc21314ac7d5e4c92ab7
net: stmmac: avoid passing pci_dev

The pci_dev is only used to provide the ethtool bus_info using
pci_name(priv->plat->pdev). This is the same as dev_name(priv->device).
Thus, rather than passing the pci_dev, make use of what we already
have.

To avoid unexpectedly exposing the device name through ethtool where
it wasn't provided before, add a flag priv->plat->provide_bus_info
to enable this, which only dwmac-intel needs to set.

Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/E1w0evI-0000000CzY7-1fyo@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c
drivers/net/ethernet/stmicro/stmmac/stmmac_ethtool.c
include/linux/stmmac.h