提交 de664717 编写于 作者: W Wolfram Sang 提交者: Zheng Zengkai

i2c: turn recovery error on init to debug

commit e409a6a3 upstream.

In some configurations, recovery is optional. So, don't throw an error
when it is not used because e.g. pinctrl settings for recovery are not
provided. Reword the message and make it debug output.
Reported-by: NKlaus Kudielka <klaus.kudielka@gmail.com>
Tested-by: NKlaus Kudielka <klaus.kudielka@gmail.com>
Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: NWolfram Sang <wsa@kernel.org>
Cc: stable@kernel.org
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 b427c18f
......@@ -262,13 +262,14 @@ EXPORT_SYMBOL_GPL(i2c_recover_bus);
static void i2c_init_recovery(struct i2c_adapter *adap)
{
struct i2c_bus_recovery_info *bri = adap->bus_recovery_info;
char *err_str;
char *err_str, *err_level = KERN_ERR;
if (!bri)
return;
if (!bri->recover_bus) {
err_str = "no recover_bus() found";
err_str = "no suitable method provided";
err_level = KERN_DEBUG;
goto err;
}
......@@ -298,7 +299,7 @@ static void i2c_init_recovery(struct i2c_adapter *adap)
return;
err:
dev_err(&adap->dev, "Not using recovery: %s\n", err_str);
dev_printk(err_level, &adap->dev, "Not using recovery: %s\n", err_str);
adap->bus_recovery_info = NULL;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册