static int dsa_user_port_apply(struct dsa_port *port)
{
struct dsa_switch *ds = port->ds;
- const char *name = port->name;
int err;
- err = dsa_slave_create(port, name);
+ err = dsa_slave_create(port);
if (err) {
dev_warn(ds->dev, "Failed to create slave %d: %d\n",
port->index, err);
/* slave.c */
extern const struct dsa_device_ops notag_netdev_ops;
void dsa_slave_mii_bus_init(struct dsa_switch *ds);
-int dsa_slave_create(struct dsa_port *port, const char *name);
+int dsa_slave_create(struct dsa_port *dp);
void dsa_slave_destroy(struct net_device *slave_dev);
int dsa_slave_suspend(struct net_device *slave_dev);
int dsa_slave_resume(struct net_device *slave_dev);
if (dsa_is_user_port(ds, i))
continue;
- ret = dsa_slave_create(&ds->ports[i], cd->port_names[i]);
+ ret = dsa_slave_create(&ds->ports[i]);
if (ret < 0)
netdev_err(master, "[%d]: can't create dsa slave device for port %d(%s): %d\n",
index, i, cd->port_names[i], ret);
call_dsa_notifiers(val, dev, &rinfo.info);
}
-int dsa_slave_create(struct dsa_port *port, const char *name)
+int dsa_slave_create(struct dsa_port *port)
{
struct dsa_port *cpu_dp = port->cpu_dp;
struct net_device *master = cpu_dp->master;
struct dsa_switch *ds = port->ds;
+ const char *name = port->name;
struct net_device *slave_dev;
struct dsa_slave_priv *p;
int ret;