Skip to content

Commit

Permalink
HID: sony: Use the SIXAXIS_CONTROLLER constant when possible
Browse files Browse the repository at this point in the history
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: Antonio Ospite <ao2@ao2.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Antonio Ospite authored and Jiri Kosina committed Jun 25, 2014
1 parent d6b92c2 commit 5076465
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/hid/hid-sony.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 5076465

Please sign in to comment.