Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 50764650 authored by Antonio Ospite's avatar Antonio Ospite Committed by Jiri Kosina
Browse files

HID: sony: Use the SIXAXIS_CONTROLLER constant when possible



Instead of checking for SIXAXIS_CONTROLLER_USB and SIXAXIS_CONTROLLER_BT
separately, a check on SIXAXIS_CONTROLLER can be used when setting
connect_mask.

Signed-off-by: default avatarAntonio Ospite <ao2@ao2.it>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent d6b92c2c
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1830,9 +1830,7 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)

	if (sc->quirks & VAIO_RDESC_CONSTANT)
		connect_mask |= HID_CONNECT_HIDDEV_FORCE;
	else if (sc->quirks & SIXAXIS_CONTROLLER_USB)
		connect_mask |= HID_CONNECT_HIDDEV_FORCE;
	else if (sc->quirks & SIXAXIS_CONTROLLER_BT)
	else if (sc->quirks & SIXAXIS_CONTROLLER)
		connect_mask |= HID_CONNECT_HIDDEV_FORCE;

	ret = hid_hw_start(hdev, connect_mask);