net: dsa: microchip: move port memory allocation to ksz_common
authorArun Ramadoss <arun.ramadoss@microchip.com>
Tue, 17 May 2022 09:43:29 +0000 (15:13 +0530)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 May 2022 11:50:59 +0000 (12:50 +0100)
commit198b34783ab10d0c58bf2ae2574e7fc704129058
treec22955fbc729b936a410647b5075d6a8cfe14605
parenta530e6f2204afe28d745adc5ecbba77e3d6a78b0
net: dsa: microchip: move port memory allocation to ksz_common

ksz8795 and ksz9477 init function initializes the memory to dev->ports,
mib counters and assigns the ds real number of ports. Since both the
routines are same, moved the allocation of port memory to
ksz_switch_register after init.

Signed-off-by: Arun Ramadoss <arun.ramadoss@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/ksz8795.c
drivers/net/dsa/microchip/ksz9477.c
drivers/net/dsa/microchip/ksz_common.c