Skip to content

Commit 93c76df

Browse files
yjun123kakra
authored andcommitted
xpadneo: Fix missing report check
This fix ensures that the missing_reported flag is correctly updated when the keyboard or gamepad is not detected. Signed-off-by: Jun Yan <jerrysteve1101@gmail.com>
1 parent be25f7b commit 93c76df

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hid-xpadneo/src/hid-xpadneo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1013,7 +1013,7 @@ static int xpadneo_event(struct hid_device *hdev, struct hid_field *field,
10131013
return 0;
10141014

10151015
keyboard_missing:
1016-
if ((xdata->missing_reported && XPADNEO_MISSING_KEYBOARD) == 0) {
1016+
if ((xdata->missing_reported & XPADNEO_MISSING_KEYBOARD) == 0) {
10171017
xdata->missing_reported |= XPADNEO_MISSING_KEYBOARD;
10181018
hid_err(hdev, "keyboard not detected\n");
10191019
}
@@ -1028,7 +1028,7 @@ static int xpadneo_init_hw(struct hid_device *hdev)
10281028
struct xpadneo_devdata *xdata = hid_get_drvdata(hdev);
10291029

10301030
if (!xdata->gamepad) {
1031-
if ((xdata->missing_reported && XPADNEO_MISSING_GAMEPAD) == 0) {
1031+
if ((xdata->missing_reported & XPADNEO_MISSING_GAMEPAD) == 0) {
10321032
xdata->missing_reported |= XPADNEO_MISSING_GAMEPAD;
10331033
hid_err(hdev, "gamepad not detected\n");
10341034
}

0 commit comments

Comments
 (0)