> int mv88e6xxx_get_temp(struct dsa_switch *ds, int *temp)
> {
> struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
> + int err;
> +
> + if (!mv88e6xxx_has(ps, MV88E6XXX_FLAG_TEMP))
> + return -EOPNOTSUPP;
> +
> + mutex_lock(&ps->smi_mutex);
>
> if (mv88e6xxx_
Add MV88E6XXX_FLAG_TEMP and MV88E6XXX_FLAG_TEMP_LIMIT flags to describe
switch models featuring a temperature access. Use them to centralize the
access to the temperature feature.
Signed-off-by: Vivien Didelot
---
drivers/net/dsa/mv88e6123.c | 6 ++
drivers/net/dsa/mv88e6131.c | 6 ++