Re: [PATCH net-next 1/3] net: dsa: assign switch device in legacy code

2017-08-05 Thread Vivien Didelot
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

Re: [PATCH net-next 1/3] net: dsa: assign switch device in legacy code

2017-08-04 Thread Andrew Lunn
> @@ -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

[PATCH net-next 1/3] net: dsa: assign switch device in legacy code

2017-08-04 Thread Vivien Didelot
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: