From: Dan Carpenter Date: Wed, 27 Aug 2025 12:57:31 +0000 (+0300) Subject: HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=5c76c794bf29399394ebacaa5af8436b8bed0d46;p=users%2Fhch%2Fmisc.git HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower() 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 Reviewed-by: Douglas Anderson Reviewed-by: Pin-yen Lin Acked-by: Jiri Kosina Signed-off-by: Douglas Anderson Link: https://lore.kernel.org/r/aK8Au3CgZSTvfEJ6@stanley.mountain --- 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;