net: dsa: mv88e6xxx: add detection helper
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Mon, 20 Jun 2016 17:14:08 +0000 (13:14 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Jun 2016 07:58:29 +0000 (03:58 -0400)
commitbc46a3d57cf7715d76eef8ea822c763cd271aacf
treee9961a546b268cc000d81ebbe6cabb89c7fc7c0a
parent4a70c4ab4fa49c07cbec519dfb9f9f90d2fec8d5
net: dsa: mv88e6xxx: add detection helper

Extract the common detection code which assigns the info structure to
the chip given the read switch ID.

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