diff options
author | Vivien Didelot <vivien.didelot@gmail.com> | 2019-10-21 16:51:30 -0400 |
---|---|---|
committer | Jakub Kicinski <jakub.kicinski@netronome.com> | 2019-10-22 12:37:07 -0700 |
commit | 7e99e34701728d54ccd0466eccf377a42b9db215 (patch) | |
tree | 9047ed67e960bddc994b2bf7a4ecbb8fa0c8ca16 /drivers/net/dsa/vitesse-vsc73xx-core.c | |
parent | 05f294a852358a46d9236cc777901f49a4f0ae85 (diff) | |
download | linux-7e99e34701728d54ccd0466eccf377a42b9db215.tar.bz2 |
net: dsa: remove dsa_switch_alloc helper
Now that ports are dynamically listed in the fabric, there is no need
to provide a special helper to allocate the dsa_switch structure. This
will give more flexibility to drivers to embed this structure as they
wish in their private 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>
Diffstat (limited to 'drivers/net/dsa/vitesse-vsc73xx-core.c')
-rw-r--r-- | drivers/net/dsa/vitesse-vsc73xx-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/dsa/vitesse-vsc73xx-core.c b/drivers/net/dsa/vitesse-vsc73xx-core.c index 614377ef7956..42c1574d45f2 100644 --- a/drivers/net/dsa/vitesse-vsc73xx-core.c +++ b/drivers/net/dsa/vitesse-vsc73xx-core.c @@ -1178,9 +1178,12 @@ int vsc73xx_probe(struct vsc73xx *vsc) * We allocate 8 ports and avoid access to the nonexistant * ports. */ - vsc->ds = dsa_switch_alloc(dev, 8); + vsc->ds = devm_kzalloc(dev, sizeof(*vsc->ds), GFP_KERNEL); if (!vsc->ds) return -ENOMEM; + + vsc->ds->dev = dev; + vsc->ds->num_ports = 8; vsc->ds->priv = vsc; vsc->ds->ops = &vsc73xx_ds_ops; |