Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-14 Thread Florian Fainelli
On 01/13/2017 02:37 PM, Florian Fainelli wrote: > On 01/13/2017 06:04 AM, Andrew Lunn wrote: >>> index cd91070b5467..d326fc4afad7 100644 >>> --- a/net/dsa/dsa2.c >>> +++ b/net/dsa/dsa2.c >>> @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, >>> >>> static bool

Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-13 Thread Florian Fainelli
On 01/13/2017 06:11 AM, Andrew Lunn wrote: >> static int _dsa_register_switch(struct dsa_switch *ds, struct device *dev) >> { >> +struct dsa_chip_data *pdata = dev->platform_data; >> struct device_node *np = dev->of_node; >> struct dsa_switch_tree *dst; >> struct device_node

Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-13 Thread Florian Fainelli
On 01/13/2017 06:04 AM, Andrew Lunn wrote: >> index cd91070b5467..d326fc4afad7 100644 >> --- a/net/dsa/dsa2.c >> +++ b/net/dsa/dsa2.c >> @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, >> >> static bool dsa_port_is_valid(struct dsa_port *port) >> { >> -return

Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-13 Thread Andrew Lunn
> static int _dsa_register_switch(struct dsa_switch *ds, struct device *dev) > { > + struct dsa_chip_data *pdata = dev->platform_data; > struct device_node *np = dev->of_node; > struct dsa_switch_tree *dst; > struct device_node *ports; > u32 tree, index; > int

Re: [PATCH net-next v2 08/10] net: dsa: Add support for platform data

2017-01-13 Thread Andrew Lunn
> index cd91070b5467..d326fc4afad7 100644 > --- a/net/dsa/dsa2.c > +++ b/net/dsa/dsa2.c > @@ -81,17 +81,23 @@ static void dsa_dst_del_ds(struct dsa_switch_tree *dst, > > static bool dsa_port_is_valid(struct dsa_port *port) > { > - return !!port->dn; > + return !!(port->dn ||