Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2694571rwo; Sun, 23 Jul 2023 22:46:29 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4Sl5MPZbDsm1tWT/OJX+I3+En/+37sBbZKLN3GWDyI38rkvpMVMZbOLxQQQCOKY0zcRk7 X-Received: by 2002:a17:90a:e617:b0:268:21f0:65e7 with SMTP id j23-20020a17090ae61700b0026821f065e7mr213450pjy.49.1690177589251; Sun, 23 Jul 2023 22:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690177589; cv=none; d=google.com; s=arc-20160816; b=bMWAO0iM9HRkb62pi2x4mptnUZgbQ5PtTxXoq4O1CjcB8aZ+rvtNj9HX/ASjtOCTQq P4NI7wadzBhgdT5DCij2Ve5dd2ZCfMKaR86i3gbifuESFEwcg5ZHF1u9oAaUa82XTGR/ v1l6HTnL6f4JwMMESqOCJL+L1OFGceN/MUYEfCFTZkBnnzZ2Oo1VND68r+CDJbEDcwaU /7DYxRrLqc6hKf9ep3cPoE4uyVBnUHY70TW4/WaChLtZ6tIGKLb2hFeH726kOLDI6Gja 5aM5RQia6nj72UqgH9snyLWpvtmFju5mRWIAHUi57+Yp1iSGFPJJuJr1aFFqgz2OZYJv xZfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=caoeUxdk/bY/30hShXkM8xzsEfv9tOC0PQvdZObEqiY=; fh=DmyxT1XhBCB2c1tEAGaI0aB42r3JLlEff0XJ0UBgbjc=; b=ei0kkCYfGvWg5zU9Euu7Jq2LRPg/vKfJATjakqkMZI1ETSEFilKHCvci7xoLpWiOUG G4kQ6Zr1DBHbj22k0MwXwIJz9fccHVQljqc3546Z65337NqIJ3XvH4H8BWnzkzAoDrxa LxU7/1ehBV0pW7jNDvs8qVeqbdzUbEA2N22CwL8QrJuH28GT2ghYZfHGrJJEtVqRdSGc uHmHkP4RenmPV9nULYQ8n4EKyqk5ALw4Y0yjJsSHRD1/El7UVUXOx2aTX91f0Fp0R7My wmB3a9T7jm/jAoUn4C9hB0L5zsPTXq7bvgFLxF3LJqauHz2yyuTMDgCNHPM9t4WRK6i4 lezw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KYD9a4lj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m10-20020a17090b068a00b0025e9a3124c7si10644397pjz.143.2023.07.23.22.46.17; Sun, 23 Jul 2023 22:46:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=KYD9a4lj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229771AbjGXFN6 (ORCPT + 99 others); Mon, 24 Jul 2023 01:13:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjGXFN4 (ORCPT ); Mon, 24 Jul 2023 01:13:56 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 78D4DE40; Sun, 23 Jul 2023 22:13:50 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-3a3373211a1so2373547b6e.0; Sun, 23 Jul 2023 22:13:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1690175629; x=1690780429; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=caoeUxdk/bY/30hShXkM8xzsEfv9tOC0PQvdZObEqiY=; b=KYD9a4ljlBeWIzDK9kSM+wtkeKt3bOrazkF5Xp838g3RE1NG9jTSHD/pFsqgGvB8pH SKWeeBfl2HV2aMTyoGX3ingxOXm0C3fabo5d1/NoM8vpoxGQr/4ZPHz9e/BmSd4mRqPm u2EMUUmFr3TfhsDfhyRQTnJm2V6Lx2LsKP9XaX+yuzg463Im6sZRUnULiXsV7cdG7JYc v9Twr8zm/d9pxtQeIwPnqSO1O1c73aJZCaWwVZmb115l8Wg1lzsWQMkmvOxqnR1IxXw8 HhzI0MYiHSmvisooFrdUvjvs6Md5ffI0KQiupCqjboAphXLLFOP7F8X294iRF0eFLzsr Jt8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690175629; x=1690780429; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=caoeUxdk/bY/30hShXkM8xzsEfv9tOC0PQvdZObEqiY=; b=OWcxKub/2T78QX4qcQty/6vxk9yvx38alH7g0uQAIdfITfhUlcdK30sN5Oxwi2Cw+I AAaRj0Hvq9b9dPQso6SP41rkK1yc2G0WjfWV67ahyIsMVNTQ/tpd9gm9yScP9pilU195 kluVqHLgxC98MVKDdj71PozXC807n9kQ7tDscdcORS2P9OpuoPvBFbrVx6w4SBdLX35U 7C6sKeWcrvTh6o7tfxUvrDxSCu7u/YsnyGWH6MoSgvHnbzN38a2TSBTWviALKrRoCk1A SAmoofEPzzpL/36ni3VehooizIqq7liYo6V3Idi8GYoHIxREW7XPPCgq44TaezxRMOc3 3SEQ== X-Gm-Message-State: ABy/qLa8akFiO0BQsXvMpj1EnNKfdxpCpAQOXirVJLK0/i5Hu7slchvQ ABb3p25etODX+vTP6Bk25lltsH/+jow= X-Received: by 2002:a05:6808:a97:b0:3a4:947:c97b with SMTP id q23-20020a0568080a9700b003a40947c97bmr9726446oij.0.1690175629481; Sun, 23 Jul 2023 22:13:49 -0700 (PDT) Received: from dtor-ws.mtv.corp.google.com ([2620:15c:9d:2:b8db:3c3:1ff4:2ae3]) by smtp.gmail.com with ESMTPSA id gv17-20020a17090b11d100b00265dc26d8dfsm7501106pjb.27.2023.07.23.22.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jul 2023 22:13:49 -0700 (PDT) From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Yangtao Li , linux-kernel@vger.kernel.org Subject: [PATCH 1/4] Input: qt2160 - tweak check for i2c adapter functionality Date: Sun, 23 Jul 2023 22:13:39 -0700 Message-ID: <20230724051345.335219-1-dmitry.torokhov@gmail.com> X-Mailer: git-send-email 2.41.0.487.g6d72f3e995-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org i2c_check_functionality() returns essentially a boolean and not an error code, so treat it as such. Signed-off-by: Dmitry Torokhov --- 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