Skip to content

Commit b127646

Browse files
aakoskinwsakernel
authored andcommitted
i2c: cbus-gpio: set atomic transfer callback
CBUS transfers have always been atomic, but after commit 63b9698 ("i2c: core: introduce callbacks for atomic transfers") we started to see warnings during e.g. poweroff as the atomic callback is not explicitly set. Fix that. Fixes the following WARNING seen during Nokia N810 power down: [ 786.570617] reboot: Power down [ 786.573913] ------------[ cut here ]------------ [ 786.578826] WARNING: CPU: 0 PID: 672 at drivers/i2c/i2c-core.h:40 i2c_smbus_xfer+0x100/0x110 [ 786.587799] No atomic I2C transfer handler for 'i2c-2' Fixes: 63b9698 ("i2c: core: introduce callbacks for atomic transfers") Signed-off-by: Aaro Koskinen <[email protected]> Signed-off-by: Wolfram Sang <[email protected]>
1 parent d58071a commit b127646

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/i2c/busses/i2c-cbus-gpio.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,8 +195,9 @@ static u32 cbus_i2c_func(struct i2c_adapter *adapter)
195195
}
196196

197197
static const struct i2c_algorithm cbus_i2c_algo = {
198-
.smbus_xfer = cbus_i2c_smbus_xfer,
199-
.functionality = cbus_i2c_func,
198+
.smbus_xfer = cbus_i2c_smbus_xfer,
199+
.smbus_xfer_atomic = cbus_i2c_smbus_xfer,
200+
.functionality = cbus_i2c_func,
200201
};
201202

202203
static int cbus_i2c_remove(struct platform_device *pdev)

0 commit comments

Comments
 (0)