Hi Andrew,
Andrew Lunn writes:
>> @@ -251,8 +251,9 @@ dsa_switch_setup(struct dsa_switch_tree *dst, struct
>> net_device *master,
>> ds->cd = cd;
>> ds->ops = ops;
>> ds->priv = priv;
>> +ds->dev = parent;
>
> Is this even needed? dsa_switch_alloc() does ds->dev = dev.
You a
> @@ -251,8 +251,9 @@ dsa_switch_setup(struct dsa_switch_tree *dst, struct
> net_device *master,
> ds->cd = cd;
> ds->ops = ops;
> ds->priv = priv;
> + ds->dev = parent;
Hi Vivien
Is this even needed? dsa_switch_alloc() does ds->dev = dev.
Andrew
Assign the parent device to the dev member of the newly allocated
dsa_switch structure in the legacy dsa_switch_setup function, so that
the underlying dsa_switch_setup_one and dsa_cpu_dsa_setups functions can
access it instead of requiring an additional struct device argument.
Signed-off-by: Vivie