diff options
author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2021-03-15 12:50:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-14 08:24:13 +0200 |
commit | 0534f1f1bc76208917d8694b84e0690cf24d59fc (patch) | |
tree | a0dc9eca4c58b509cbdc5d285a27b6df3322e0f6 /drivers/i2c/i2c-core-base.c | |
parent | cafced0419152f60723c144923e6f270b856f5de (diff) | |
download | linux-stable-0534f1f1bc76208917d8694b84e0690cf24d59fc.tar.gz linux-stable-0534f1f1bc76208917d8694b84e0690cf24d59fc.tar.bz2 linux-stable-0534f1f1bc76208917d8694b84e0690cf24d59fc.zip |
i2c: turn recovery error on init to debug
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@gmail.com>
Tested-by: Klaus Kudielka <klaus.kudielka@gmail.com>
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/i2c/i2c-core-base.c')
-rw-r--r-- | drivers/i2c/i2c-core-base.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index 2dfe2ffcf882..840f59650c7c 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c @@ -254,13 +254,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; } @@ -290,7 +291,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; } |