* [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
@ 2025-08-27 12:57 Dan Carpenter
2025-08-27 13:43 ` Pin-yen Lin
2025-08-27 15:26 ` Doug Anderson
0 siblings, 2 replies; 5+ messages in thread
From: Dan Carpenter @ 2025-08-27 12:57 UTC (permalink / raw)
To: Pin-yen Lin
Cc: Jiri Kosina, Benjamin Tissoires, Douglas Anderson,
Aleksandrs Vinarskis, Wentao Guan, Bartłomiej Maryńczak,
Dmitry Torokhov, Kenny Levinsen, linux-input, linux-kernel,
kernel-janitors
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
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
2025-08-27 12:57 [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() Dan Carpenter
@ 2025-08-27 13:43 ` Pin-yen Lin
2025-08-27 15:26 ` Doug Anderson
1 sibling, 0 replies; 5+ messages in thread
From: Pin-yen Lin @ 2025-08-27 13:43 UTC (permalink / raw)
To: Dan Carpenter
Cc: Jiri Kosina, Benjamin Tissoires, Douglas Anderson,
Aleksandrs Vinarskis, Wentao Guan, Bartłomiej Maryńczak,
Dmitry Torokhov, Kenny Levinsen, linux-input, linux-kernel,
kernel-janitors
Hi Dan,
On Wed, Aug 27, 2025 at 8:57 PM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> 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
>
Reviewed-by: Pin-yen Lin <treapking@chromium.org>
Thanks for catching this!
Regards,
Pin-yen
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
2025-08-27 12:57 [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() Dan Carpenter
2025-08-27 13:43 ` Pin-yen Lin
@ 2025-08-27 15:26 ` Doug Anderson
2025-08-27 15:39 ` Jiri Kosina
1 sibling, 1 reply; 5+ messages in thread
From: Doug Anderson @ 2025-08-27 15:26 UTC (permalink / raw)
To: Dan Carpenter, Jiri Kosina
Cc: Pin-yen Lin, Benjamin Tissoires, Aleksandrs Vinarskis,
Wentao Guan, Bartłomiej Maryńczak, Dmitry Torokhov,
Kenny Levinsen, linux-input, linux-kernel, kernel-janitors
Hi,
On Wed, Aug 27, 2025 at 5:57 AM Dan Carpenter <dan.carpenter@linaro.org> wrote:
>
> 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(-)
Reviewed-by: Douglas Anderson <dianders@chromium.org
Jiri / Benjamin: if one of you can give this a quick Ack then I'll
throw it into drm-misc-next with the patch it's fixing.
-Doug
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
2025-08-27 15:26 ` Doug Anderson
@ 2025-08-27 15:39 ` Jiri Kosina
2025-08-27 23:38 ` Doug Anderson
0 siblings, 1 reply; 5+ messages in thread
From: Jiri Kosina @ 2025-08-27 15:39 UTC (permalink / raw)
To: Doug Anderson
Cc: Dan Carpenter, Pin-yen Lin, Benjamin Tissoires,
Aleksandrs Vinarskis, Wentao Guan, Bartłomiej Maryńczak,
Dmitry Torokhov, Kenny Levinsen, linux-input, linux-kernel,
kernel-janitors
On Wed, 27 Aug 2025, Doug Anderson wrote:
> > 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(-)
>
> Reviewed-by: Douglas Anderson <dianders@chromium.org
This seems to be missing closing bracket :)
> Jiri / Benjamin: if one of you can give this a quick Ack then I'll
> throw it into drm-misc-next with the patch it's fixing.
Acked-by: Jiri Kosina <jkosina@suse.com>
Thanks!
--
Jiri Kosina
SUSE Labs
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
2025-08-27 15:39 ` Jiri Kosina
@ 2025-08-27 23:38 ` Doug Anderson
0 siblings, 0 replies; 5+ messages in thread
From: Doug Anderson @ 2025-08-27 23:38 UTC (permalink / raw)
To: Jiri Kosina
Cc: Dan Carpenter, Pin-yen Lin, Benjamin Tissoires,
Aleksandrs Vinarskis, Wentao Guan, Bartłomiej Maryńczak,
Dmitry Torokhov, Kenny Levinsen, linux-input, linux-kernel,
kernel-janitors
Hi,
On Wed, Aug 27, 2025 at 8:39 AM Jiri Kosina <jikos@kernel.org> wrote:
>
> On Wed, 27 Aug 2025, Doug Anderson wrote:
>
> > > 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(-)
> >
> > Reviewed-by: Douglas Anderson <dianders@chromium.org
>
> This seems to be missing closing bracket :)
Fixed. The tools would probably have caught it, but better to be safe.
...actually, "b4" fixed it for me. :-P
> > Jiri / Benjamin: if one of you can give this a quick Ack then I'll
> > throw it into drm-misc-next with the patch it's fixing.
>
> Acked-by: Jiri Kosina <jkosina@suse.com>
Pushed to drm-misc-next.
[1/1] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
commit: 5c76c794bf29399394ebacaa5af8436b8bed0d46
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-08-27 23:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-27 12:57 [PATCH next] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() Dan Carpenter
2025-08-27 13:43 ` Pin-yen Lin
2025-08-27 15:26 ` Doug Anderson
2025-08-27 15:39 ` Jiri Kosina
2025-08-27 23:38 ` Doug Anderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox