Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Wolfram Sang and committed by
Wolfram Sang
7168bff2 63b96983

+6
+6
drivers/i2c/i2c-mux.c
··· 310 310 else 311 311 priv->algo.master_xfer = __i2c_mux_master_xfer; 312 312 } 313 + if (parent->algo->master_xfer_atomic) 314 + priv->algo.master_xfer_atomic = priv->algo.master_xfer; 315 + 313 316 if (parent->algo->smbus_xfer) { 314 317 if (muxc->mux_locked) 315 318 priv->algo.smbus_xfer = i2c_mux_smbus_xfer; 316 319 else 317 320 priv->algo.smbus_xfer = __i2c_mux_smbus_xfer; 318 321 } 322 + if (parent->algo->smbus_xfer_atomic) 323 + priv->algo.smbus_xfer_atomic = priv->algo.smbus_xfer; 324 + 319 325 priv->algo.functionality = i2c_mux_functionality; 320 326 321 327 /* Now fill out new adapter structure */