]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: mv88e6xxx: add switch register helpers
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 20 Jun 2016 17:14:02 +0000 (13:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 07:58:29 +0000 (03:58 -0400)
commit9ed64e9283d259df96880af70cf88dbf246a9a45
tree37c7632161e3ad9f703785f7985576b8004c1a3f
parentd34b6effc04a7a7118958cd42f28ab24981f318c
net: dsa: mv88e6xxx: add switch register helpers

The mixed assignments, allocations and registrations in the probe code
make it hard to follow the logic and figure out what is DSA or chip
specific.

Extract the struct dsa_switch related code in a simple
mv88e6xxx_register_switch helper function.

For symmetry in the code, add a mv88e6xxx_unregister_switch function.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c