i2c: mux: populate the new *_atomic callbacks
If the parent adapter has atomic_xfer callbacks, populate them for the mux adapter as well. We can use the same translation function as for the non-atomic xfer callback. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Reviewed-by: Peter Rosin <peda@axentia.se> Reviewed-by Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
parent
63b96983a5
commit
7168bff2cf
|
@ -310,12 +310,18 @@ int i2c_mux_add_adapter(struct i2c_mux_core *muxc,
|
|||
else
|
||||
priv->algo.master_xfer = __i2c_mux_master_xfer;
|
||||
}
|
||||
if (parent->algo->master_xfer_atomic)
|
||||
priv->algo.master_xfer_atomic = priv->algo.master_xfer;
|
||||
|
||||
if (parent->algo->smbus_xfer) {
|
||||
if (muxc->mux_locked)
|
||||
priv->algo.smbus_xfer = i2c_mux_smbus_xfer;
|
||||
else
|
||||
priv->algo.smbus_xfer = __i2c_mux_smbus_xfer;
|
||||
}
|
||||
if (parent->algo->smbus_xfer_atomic)
|
||||
priv->algo.smbus_xfer_atomic = priv->algo.smbus_xfer;
|
||||
|
||||
priv->algo.functionality = i2c_mux_functionality;
|
||||
|
||||
/* Now fill out new adapter structure */
|
||||
|
|
Loading…
Reference in New Issue