Re: [PATCH net-next v2 3/7] net: dsa: mv88e6xxx: add switch info

2016-04-15 Thread Andrew Lunn
> + for (i = 0, info = [i]; i < num; info = [++i]) > + if (info->prod_num == (id & 0xfff0) >> 4) > + goto found; > > return NULL; > -} > > -char *mv88e6xxx_drv_probe(struct device *dsa_dev, struct device *host_dev, > - int

[PATCH net-next v2 3/7] net: dsa: mv88e6xxx: add switch info

2016-04-15 Thread Vivien Didelot
Add a new switch info structure which will be later extended to store switch models static information, such as product number, name, number of ports, number of databases, etc. Merge the lookup function in the probing code, so that we avoid multiple checking of the MII bus, as well a multiple ID