[net-next,0/3] net: stmmac: pass struct device to init/exit

Message ID aR2V0Kib7j0L4FNN@shell.armlinux.org.uk (mailing list archive)
Headers
Series net: stmmac: pass struct device to init/exit |

Message

Russell King (Oracle) Nov. 19, 2025, 10:02 a.m. UTC
Rather than passing the platform device to the ->init() and ->exit()
methods, make these methods useful for other devices by passing the
struct device instead. Update the implementations appropriately for
this change.

Move the calls for these methods into the core driver's probe and
remove methods from the stmmac_platform layer.

Convert dwmac-rk to use ->init() and ->exit().

 .../net/ethernet/stmicro/stmmac/dwmac-anarion.c    |  4 +-
 .../net/ethernet/stmicro/stmmac/dwmac-eic7700.c    |  4 +-
 .../net/ethernet/stmicro/stmmac/dwmac-loongson1.c  | 12 +++---
 .../ethernet/stmicro/stmmac/dwmac-renesas-gbeth.c  |  4 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c     | 47 +++++++++-------------
 drivers/net/ethernet/stmicro/stmmac/dwmac-s32.c    | 14 +++----
 .../net/ethernet/stmicro/stmmac/dwmac-socfpga.c    |  2 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-sti.c    |  4 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-sun8i.c  | 10 ++---
 drivers/net/ethernet/stmicro/stmmac/dwmac-sunxi.c  |  4 +-
 drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c  |  2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c  | 47 ++++++++++++++++------
 .../net/ethernet/stmicro/stmmac/stmmac_platform.c  | 35 +++++-----------
 include/linux/stmmac.h                             |  4 +-
 14 files changed, 94 insertions(+), 99 deletions(-)