]> git.ipfire.org Git - thirdparty/linux.git/commit
net: dsa: microchip: hook up ksz_switch_alloc() to chip-specific dsa_switch_ops
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 5 May 2026 14:25:07 +0000 (16:25 +0200)
committerJakub Kicinski <kuba@kernel.org>
Sat, 9 May 2026 02:09:13 +0000 (19:09 -0700)
commitadb50fc9960bd2b71503ccc88d3473df2d1f77ff
tree6a66bd7d2e4aa777bae2af420cb8b214dfdaae73
parenta774b19c117d76552054cf3d771220bc2d896dd0
net: dsa: microchip: hook up ksz_switch_alloc() to chip-specific dsa_switch_ops

Now that each switch driver has its own dsa_switch_ops (currently a copy
of ksz_switch_ops), we no longer need ksz_switch_ops and can remove it.

Get to the driver-specific dsa_switch_ops through the ksz_chip_data
structure.
Reorder the alloc()/get_match_data() calls such as to have that
pointer available.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20260505-clean-ksz-driver-v1-7-05d70fa42461@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz8863_smi.c
drivers/net/dsa/microchip/ksz9477_i2c.c
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_common.h
drivers/net/dsa/microchip/ksz_spi.c