summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2022-01-10 11:59:32 +0300
committerJiri Kosina <jkosina@suse.cz>2022-01-10 11:59:32 +0300
commitcd598d21294e088c3c9e518a7e9098f94ae8cf6a (patch)
treeb979128ae21c96469a52927913b98e41bef9ed85 /drivers/hid
parentf7716563441ae29cc91954a7744ff7bfdd344b2d (diff)
parent415e701cee5228f168049881624e343d9a3d97bb (diff)
downloadlinux-cd598d21294e088c3c9e518a7e9098f94ae8cf6a.tar.xz
Merge branch 'for-5.17/thrustmaster' into for-linus
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-tmff.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/hid/hid-tmff.c b/drivers/hid/hid-tmff.c
index 90acef304536..4040cd98dafe 100644
--- a/drivers/hid/hid-tmff.c
+++ b/drivers/hid/hid-tmff.c
@@ -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:
@@ -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;