quoted hunk ↗ jump to hunk
+static struct otto_emdio_priv *otto_emdio_bus_to_priv(struct mii_bus *bus)
+{
+ return ((struct otto_emdio_chan *)bus->priv)->priv;
Assuming priv is a void *, you should not need the cast. You might
however need an intermediary variable.
+ scoped_guard(mutex, &priv->lock)
+ ret = (*priv->info->write_c45)(bus, port, dev_addr, regnum, value);
The (* ) should not be needed.
Andrew