Skip to content

Commit cd598d2

Browse files
author
Jiri Kosina
committed
Merge branch 'for-5.17/thrustmaster' into for-linus
2 parents f771656 + 415e701 commit cd598d2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

drivers/hid/hid-tmff.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ static int tmff_play(struct input_dev *dev, void *data,
7878
struct hid_field *ff_field = tmff->ff_field;
7979
int x, y;
8080
int left, right; /* Rumbling */
81-
int motor_swap;
8281

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

106105
/* 2-in-1 strong motor is left */
107-
if (hid->product == THRUSTMASTER_DEVICE_ID_2_IN_1_DT) {
108-
motor_swap = left;
109-
left = right;
110-
right = motor_swap;
111-
}
106+
if (hid->product == THRUSTMASTER_DEVICE_ID_2_IN_1_DT)
107+
swap(left, right);
112108

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

0 commit comments

Comments
 (0)