net: dsa: Pass the dsa device to the switch drivers

By passing a device structure to the switch devices, it allows them
to use devm_* methods for resource management.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Tested-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Andrew Lunn
2016-04-13 02:40:39 +02:00
committed by David S. Miller
parent 71bbe25d01
commit bbb8d79399
8 changed files with 18 additions and 10 deletions

View File

@@ -135,7 +135,8 @@ static int bcm_sf2_sw_get_sset_count(struct dsa_switch *ds)
return BCM_SF2_STATS_SIZE;
}
static char *bcm_sf2_sw_probe(struct device *host_dev, int sw_addr)
static char *bcm_sf2_sw_probe(struct device *dsa_dev, struct device *host_dev,
int sw_addr)
{
return "Broadcom Starfighter 2";
}