HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
Subsystems (2)
PATCH 1/1 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.
--- drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/hid/i2c-hid/i2c-hid-core.c +1 -1
@@ -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;
Signature · 1 line
2.47.2
Hi Dan,
Quoted 24 lines · Dan Carpenter
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 <[email protected]>--- drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/hid/i2c-hid/i2c-hid-core.c +1
-2@@ -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; --
Quoted 2 lines
2.47.2
Thanks for catching this!
Regards,
Pin-yen
Hi,
Quoted 9 lines · Dan Carpenter
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 <[email protected]>--- drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
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
Quoted 10 lines · Doug Anderson
Quoted 8 lines
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 <[email protected]>--- drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Reviewed-by Douglas Anderson <[email protected]
This seems to be missing closing bracket :)
Quoted 2 lines
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.
Thanks!
Signature · 2 lines
Jiri Kosina SUSE Labs
Doug Anderson
AppliedHi,
Quoted 12 lines · Jiri Kosina
Quoted 9 lines · Doug Anderson
Quoted 8 lines
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 <[email protected]>--- drivers/hid/i2c-hid/i2c-hid-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 3 lines
Quoted 1 line
Reviewed-by Douglas Anderson <[email protected]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
Quoted 4 lines
Quoted 2 lines
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 <[email protected]>
Pushed to drm-misc-next.
[1/1] HID: i2c-hid: Fix test in i2c_hid_core_register_panel_follower()
commit: 5c76c794bf29399394ebacaa5af8436b8bed0d46