i2c: core: apply 'is_suspended' check for SMBus, too
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 25 Apr 2019 14:19:48 +0000 (16:19 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 3 May 2019 14:44:51 +0000 (16:44 +0200)
commit5d756112da49af8798620fc788ff4c730c7d5574
tree2b417de7894cf5cfee07a5faf601f895a4a4db05
parent4db61c2a16fce2ef85d82751de4ba43a39347cfb
i2c: core: apply 'is_suspended' check for SMBus, too

We checked I2C calls, but not SMBus. Refactor the helper to an inline
function and use it for both, I2C and SMBus.

Fixes: 9ac6cb5fbb17 ("i2c: add suspended flag and accessors for i2c adapters")
Reported-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Simon Horman <horms+renesas@verge.net.au>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/i2c-core-base.c
drivers/i2c/i2c-core-smbus.c
drivers/i2c/i2c-core.h