Skip to content

Commit

Permalink
Merge branch 'for-5.17/thrustmaster' into for-linus
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiri Kosina committed Jan 10, 2022
2 parents f771656 + 415e701 commit cd598d2
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions drivers/hid/hid-tmff.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ static int tmff_play(struct input_dev *dev, void *data,
struct hid_field *ff_field = tmff->ff_field;
int x, y;
int left, right; /* Rumbling */
int motor_swap;

switch (effect->type) {
case FF_CONSTANT:
Expand All @@ -104,11 +103,8 @@ static int tmff_play(struct input_dev *dev, void *data,
ff_field->logical_maximum);

/* 2-in-1 strong motor is left */
if (hid->product == THRUSTMASTER_DEVICE_ID_2_IN_1_DT) {
motor_swap = left;
left = right;
right = motor_swap;
}
if (hid->product == THRUSTMASTER_DEVICE_ID_2_IN_1_DT)
swap(left, right);

dbg_hid("(left,right)=(%08x, %08x)\n", left, right);
ff_field->value[0] = left;
Expand Down

0 comments on commit cd598d2

Please sign in to comment.