From: Dan Carpenter <dan.carpenter@linaro.org>
To: Pin-yen Lin <treapking@chromium.org>
Cc: "Jiri Kosina" <jikos@kernel.org>,
"Benjamin Tissoires" <bentiss@kernel.org>,
"Douglas Anderson" <dianders@chromium.org>,
"Aleksandrs Vinarskis" <alex.vinarskis@gmail.com>,
"Wentao Guan" <guanwentao@uniontech.com>,
"Bartłomiej Maryńczak" <marynczakbartlomiej@gmail.com>,
"Dmitry Torokhov" <dmitry.torokhov@gmail.com>,
"Kenny Levinsen" <kl@kl.wtf>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
Date: Wed, 27 Aug 2025 15:57:31 +0300 [thread overview]
Message-ID: <aK8Au3CgZSTvfEJ6@stanley.mountain> (raw)
Bitwise AND was intended instead of OR. With the current code the
condition is always true.
Fixes: cbdd16b818ee ("HID: i2c-hid: Make elan touch controllers power on after panel is enabled")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
drivers/hid/i2c-hid/i2c-hid-core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/i2c-hid/i2c-hid-core.c b/drivers/hid/i2c-hid/i2c-hid-core.c
index 99ce6386176c..30ebde1273be 100644
--- a/drivers/hid/i2c-hid/i2c-hid-core.c
+++ b/drivers/hid/i2c-hid/i2c-hid-core.c
@@ -1189,7 +1189,7 @@ static int i2c_hid_core_register_panel_follower(struct i2c_hid *ihid)
struct device *dev = &ihid->client->dev;
int ret;
- if (ihid->hid->initial_quirks | HID_QUIRK_POWER_ON_AFTER_BACKLIGHT)
+ if (ihid->hid->initial_quirks & HID_QUIRK_POWER_ON_AFTER_BACKLIGHT)
ihid->panel_follower.funcs = &i2c_hid_core_panel_follower_enable_funcs;
else
ihid->panel_follower.funcs = &i2c_hid_core_panel_follower_prepare_funcs;
--
2.47.2
next reply other threads:[~2025-08-27 12:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-27 12:57 Dan Carpenter [this message]
2025-08-27 13:43 ` [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() Pin-yen Lin
2025-08-27 15:26 ` Doug Anderson
2025-08-27 15:39 ` Jiri Kosina
2025-08-27 23:38 ` Doug Anderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aK8Au3CgZSTvfEJ6@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=alex.vinarskis@gmail.com \
--cc=bentiss@kernel.org \
--cc=dianders@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=guanwentao@uniontech.com \
--cc=jikos@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=kl@kl.wtf \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marynczakbartlomiej@gmail.com \
--cc=treapking@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox