]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: lan9303: Only allocate 3 ports
authorEgil Hjelmeland <privat@egil-hjelmeland.no>
Mon, 7 Aug 2017 22:22:21 +0000 (00:22 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Aug 2017 01:13:59 +0000 (18:13 -0700)
commitb9f23a166b8778735e0b78200184a2e7540c699d
tree2786c635b97f7bf44df02ea3ed7d5f720f0d6696
parent59aee7f01a75f1121151eff6f206a5ad48254edd
net: dsa: lan9303: Only allocate 3 ports

Save 2628 bytes on arm eabi by allocate only the required 3 ports.

Now that ds->num_ports is correct: In net/dsa/tag_lan9303.c
eliminate duplicate LAN9303_MAX_PORTS, use ds->num_ports.
(Matching the pattern of other net/dsa/tag_xxx.c files.)

Signed-off-by: Egil Hjelmeland <privat@egil-hjelmeland.no>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/lan9303-core.c
net/dsa/tag_lan9303.c