]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: Refactor selection of tag ops into a function
authorAndrew Lunn <andrew@lunn.ch>
Sat, 4 Jun 2016 19:17:03 +0000 (21:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jun 2016 21:29:54 +0000 (14:29 -0700)
commitdb477bc0c413ca40ed37a8488d14b7cab3d049ba
tree4c9edb3b66b95a2a6215e2844c131ac618424b8b
parent6b82d515519b89c9020f23e1e0ee503f8dfa02a6
net: dsa: Refactor selection of tag ops into a function

Replace the two switch statements with an array lookup, and store the
result in the dsa tree structure. The drivers no longer need to know
the selected tag protocol, so remove it from the dsa switch structure.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
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>
include/net/dsa.h
net/dsa/dsa.c
net/dsa/dsa_priv.h
net/dsa/slave.c