提交 c126f7c3 编写于 作者: D Dmitry Osipenko 提交者: Wolfram Sang

i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented

The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up
by the bus driver, which the case for Tegra I2C driver for example. This
error code is then propagated to I2C client and might be confusing, thus
make i2c_recover_bus() to return -EBUSY instead.
Suggested-by: NWolfram Sang <wsa@the-dreams.de>
Signed-off-by: NDmitry Osipenko <digetx@gmail.com>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
上级 8f66edb2
...@@ -249,7 +249,7 @@ EXPORT_SYMBOL_GPL(i2c_generic_scl_recovery); ...@@ -249,7 +249,7 @@ EXPORT_SYMBOL_GPL(i2c_generic_scl_recovery);
int i2c_recover_bus(struct i2c_adapter *adap) int i2c_recover_bus(struct i2c_adapter *adap)
{ {
if (!adap->bus_recovery_info) if (!adap->bus_recovery_info)
return -EOPNOTSUPP; return -EBUSY;
dev_dbg(&adap->dev, "Trying i2c bus recovery\n"); dev_dbg(&adap->dev, "Trying i2c bus recovery\n");
return adap->bus_recovery_info->recover_bus(adap); return adap->bus_recovery_info->recover_bus(adap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册