[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210415144415.157036767@linuxfoundation.org>
Date: Thu, 15 Apr 2021 16:47:02 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Klaus Kudielka <klaus.kudielka@...il.com>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Wolfram Sang <wsa@...nel.org>, stable@...nel.org
Subject: [PATCH 4.14 21/68] i2c: turn recovery error on init to debug
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
commit e409a6a3e0690efdef9b8a96197bc61ff117cfaf 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: Klaus Kudielka <klaus.kudielka@...il.com>
Tested-by: Klaus Kudielka <klaus.kudielka@...il.com>
Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Signed-off-by: Wolfram Sang <wsa@...nel.org>
Cc: stable@...nel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/i2c/i2c-core-base.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/i2c/i2c-core-base.c
+++ b/drivers/i2c/i2c-core-base.c
@@ -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;
}
@@ -296,7 +297,7 @@ static void i2c_init_recovery(struct i2c
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;
}
Powered by blists - more mailing lists