[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230724051345.335219-1-dmitry.torokhov@gmail.com>
Date: Sun, 23 Jul 2023 22:13:39 -0700
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: linux-input@...r.kernel.org
Cc: Yangtao Li <frank.li@...o.com>, linux-kernel@...r.kernel.org
Subject: [PATCH 1/4] Input: qt2160 - tweak check for i2c adapter functionality
i2c_check_functionality() returns essentially a boolean and not an error
code, so treat it as such.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>
---
drivers/input/keyboard/qt2160.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/input/keyboard/qt2160.c b/drivers/input/keyboard/qt2160.c
index 599ea85cfd30..b0b9d7a2691e 100644
--- a/drivers/input/keyboard/qt2160.c
+++ b/drivers/input/keyboard/qt2160.c
@@ -345,12 +345,9 @@ static int qt2160_probe(struct i2c_client *client)
int i;
int error;
- /* Check functionality */
- error = i2c_check_functionality(client->adapter,
- I2C_FUNC_SMBUS_BYTE);
- if (!error) {
+ if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE)) {
dev_err(&client->dev, "%s adapter not supported\n",
- dev_driver_string(&client->adapter->dev));
+ dev_driver_string(&client->adapter->dev));
return -ENODEV;
}
--
2.41.0.487.g6d72f3e995-goog
Powered by blists - more mailing lists