Re: [PATCH net-next 04/21] net: dsa: mv88e6xxx: factorize EEPROM access

From: Andrew Lunn
Date: Fri May 06 2016 - 18:20:24 EST


> @@ -2596,6 +2797,9 @@ int mv88e6xxx_setup_common(struct mv88e6xxx_priv_state *ps)
>
> INIT_WORK(&ps->bridge_work, mv88e6xxx_bridge_work);
>
> + if (mv88e6xxx_has(ps, MV88E6XXX_FLAG_EEPROM))
> + mutex_init(&ps->eeprom_mutex);
> +

This seems to be the only place MV88E6XXX_FLAG_EEPROM is checked. It
seems like mv88e6xxx_get_eeprom() and and mv88e6xxx_set_eeprom()
should also check this.

Andrew