Commit fc99f22c authored by Daniel Mack's avatar Daniel Mack Committed by Jiri Kosina

HID: hid-input.c: indentation fixes

Signed-off-by: default avatarDaniel Mack <daniel@caiaq.de>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 1c5474a6
...@@ -199,11 +199,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel ...@@ -199,11 +199,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case HID_GD_MOUSE: case HID_GD_MOUSE:
case HID_GD_POINTER: code += 0x110; break; case HID_GD_POINTER: code += 0x110; break;
case HID_GD_JOYSTICK: case HID_GD_JOYSTICK:
if (code <= 0xf) if (code <= 0xf)
code += BTN_JOYSTICK; code += BTN_JOYSTICK;
else else
code += BTN_TRIGGER_HAPPY; code += BTN_TRIGGER_HAPPY;
break; break;
case HID_GD_GAMEPAD: code += 0x130; break; case HID_GD_GAMEPAD: code += 0x130; break;
default: default:
switch (field->physical) { switch (field->physical) {
...@@ -480,7 +480,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel ...@@ -480,7 +480,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
case HID_UP_LOGIVENDOR: case HID_UP_LOGIVENDOR:
goto ignore; goto ignore;
case HID_UP_PID: case HID_UP_PID:
switch (usage->hid & HID_USAGE) { switch (usage->hid & HID_USAGE) {
case 0xa4: map_key_clear(BTN_DEAD); break; case 0xa4: map_key_clear(BTN_DEAD); break;
...@@ -586,9 +586,9 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct ...@@ -586,9 +586,9 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1; hat_dir = (value - usage->hat_min) * 8 / (usage->hat_max - usage->hat_min + 1) + 1;
if (hat_dir < 0 || hat_dir > 8) hat_dir = 0; if (hat_dir < 0 || hat_dir > 8) hat_dir = 0;
input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x); input_event(input, usage->type, usage->code , hid_hat_to_axis[hat_dir].x);
input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y); input_event(input, usage->type, usage->code + 1, hid_hat_to_axis[hat_dir].y);
return; return;
} }
if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */ if (usage->hid == (HID_UP_DIGITIZER | 0x003c)) { /* Invert */
*quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT); *quirks = value ? (*quirks | HID_QUIRK_INVERT) : (*quirks & ~HID_QUIRK_INVERT);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment