@@ -865,7 +865,7 @@ static int xpadneo_input_configured(struct hid_device *hdev, struct hid_input *h
865865 /* combine triggers to form a rudder, use ABS_MISC to order after dpad */
866866 input_set_abs_params (xdata -> gamepad , ABS_MISC , -1023 , 1023 , 3 , 63 );
867867
868- /* do not report the consumer control buttons as part of the gamepad */
868+ /* do not report the keyboard buttons as part of the gamepad */
869869 __clear_bit (BTN_XBOX , xdata -> gamepad -> keybit );
870870 __clear_bit (BTN_SHARE , xdata -> gamepad -> keybit );
871871
@@ -884,7 +884,7 @@ static int xpadneo_event(struct hid_device *hdev, struct hid_field *field,
884884{
885885 struct xpadneo_devdata * xdata = hid_get_drvdata (hdev );
886886 struct input_dev * gamepad = xdata -> gamepad ;
887- struct input_dev * consumer = xdata -> consumer ;
887+ struct input_dev * keyboard = xdata -> keyboard ;
888888
889889 if ((usage -> type == EV_KEY ) && (usage -> code == BTN_PADDLES (0 ))) {
890890 if (gamepad && xdata -> profile == 0 ) {
@@ -929,24 +929,24 @@ static int xpadneo_event(struct hid_device *hdev, struct hid_field *field,
929929 xdata -> xbox_button_down = false;
930930 if (xdata -> profile_switched ) {
931931 xdata -> profile_switched = false;
932- } else if (consumer ) {
932+ } else if (keyboard ) {
933933 /* replay cached event */
934- input_report_key (consumer , BTN_XBOX , 1 );
935- input_sync (consumer );
934+ input_report_key (keyboard , BTN_XBOX , 1 );
935+ input_sync (keyboard );
936936 /* synthesize the release to remove the scan code */
937- input_report_key (consumer , BTN_XBOX , 0 );
938- input_sync (consumer );
937+ input_report_key (keyboard , BTN_XBOX , 0 );
938+ input_sync (keyboard );
939939 }
940940 }
941- if (!consumer )
942- goto consumer_missing ;
941+ if (!keyboard )
942+ goto keyboard_missing ;
943943 goto stop_processing ;
944944 } else if ((usage -> type == EV_KEY ) && (usage -> code == BTN_SHARE )) {
945- /* move the Share button to the consumer control device */
946- if (!consumer )
947- goto consumer_missing ;
948- input_report_key (consumer , BTN_SHARE , value );
949- input_sync (consumer );
945+ /* move the Share button to the keyboard device */
946+ if (!keyboard )
947+ goto keyboard_missing ;
948+ input_report_key (keyboard , BTN_SHARE , value );
949+ input_sync (keyboard );
950950 goto stop_processing ;
951951 } else if (xdata -> xbox_button_down && (usage -> type == EV_KEY )) {
952952 if (!(xdata -> quirks & XPADNEO_QUIRK_USE_HW_PROFILES )) {
@@ -985,10 +985,10 @@ static int xpadneo_event(struct hid_device *hdev, struct hid_field *field,
985985 }
986986 return 0 ;
987987
988- consumer_missing :
989- if ((xdata -> missing_reported && XPADNEO_MISSING_CONSUMER ) == 0 ) {
990- xdata -> missing_reported |= XPADNEO_MISSING_CONSUMER ;
991- hid_err (hdev , "consumer control not detected\n" );
988+ keyboard_missing :
989+ if ((xdata -> missing_reported && XPADNEO_MISSING_KEYBOARD ) == 0 ) {
990+ xdata -> missing_reported |= XPADNEO_MISSING_KEYBOARD ;
991+ hid_err (hdev , "keyboard not detected\n" );
992992 }
993993
994994stop_processing :
0 commit comments