]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: allocate ports on touch
authorVivien Didelot <vivien.didelot@gmail.com>
Mon, 21 Oct 2019 20:51:29 +0000 (16:51 -0400)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 22 Oct 2019 19:37:07 +0000 (12:37 -0700)
commit420d948277f5c72ed8a7b03f19fd0ec1a8ac5e7f
tree94bdc5aa04031d3c601b7a820339d0ddb0a5a2cf
parent1b1c14866925073d162e34d8b05ce6496c0f2772
net: dsa: allocate ports on touch

Allocate the struct dsa_port the first time it is accessed with
dsa_port_touch, and remove the static dsa_port array from the
dsa_switch structure.

Signed-off-by: Vivien Didelot <vivien.didelot@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
include/net/dsa.h
net/dsa/dsa2.c