OSDN Git Service

net: dsa: sja1105: parameterize the number of ports
authorVladimir Oltean <vladimir.oltean@nxp.com>
Mon, 24 May 2021 13:14:13 +0000 (16:14 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 24 May 2021 20:59:03 +0000 (13:59 -0700)
commit542043e91df452ed09f382d8c41cdf3788f31b5e
tree421fb40a23ded9135d3587f4a2db8bdfc7b291bf
parentfeeb371272febb2a4fd01bc84b0bfbf8acd07048
net: dsa: sja1105: parameterize the number of ports

The sja1105 driver will gain support for the next-gen SJA1110 switch,
which is very similar except for the fact it has more than 5 ports.

So we need to replace the hardcoded SJA1105_NUM_PORTS in this driver
with ds->num_ports. This patch is as mechanical as possible (save for
the fact that ds->num_ports is not an integer constant expression).

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/sja1105/sja1105_clocking.c
drivers/net/dsa/sja1105/sja1105_flower.c
drivers/net/dsa/sja1105/sja1105_main.c
drivers/net/dsa/sja1105/sja1105_spi.c
drivers/net/dsa/sja1105/sja1105_tas.c