Linux Input/HID development
 help / color / mirror / Atom feed
From: Antonio Ospite <ao2@ao2.it>
To: linux-input@vger.kernel.org
Cc: Antonio Ospite <ao2@ao2.it>, Jiri Kosina <jkosina@suse.cz>,
	simon@mungewell.org, Frank Praznik <frank.praznik@oh.rr.com>
Subject: [PATCH 1/4] HID: sony: Use the SIXAXIS_CONTROLLER constant when possible
Date: Tue, 24 Jun 2014 13:28:40 +0200	[thread overview]
Message-ID: <1403609323-27283-2-git-send-email-ao2@ao2.it> (raw)
In-Reply-To: <1403609323-27283-1-git-send-email-ao2@ao2.it>

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>
---
 drivers/hid/hid-sony.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c
index 2259eaa..a77269b 100644
--- a/drivers/hid/hid-sony.c
+++ b/drivers/hid/hid-sony.c
@@ -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);
-- 
2.0.0


  reply	other threads:[~2014-06-24 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-24 11:28 [PATCH 0/4] HID: sony: Some cleanups Antonio Ospite
2014-06-24 11:28 ` Antonio Ospite [this message]
2014-06-24 11:28 ` [PATCH 2/4] HID: sony: Always override the Sixaxis descriptor Antonio Ospite
2014-06-24 11:28 ` [PATCH 3/4] HID: sony: Format and comment sixaxis_rdesc Antonio Ospite
2014-06-24 11:28 ` [PATCH 4/4] HID: sony: Remove an old and redundant comment Antonio Ospite
2014-06-25 19:23 ` [PATCH 0/4] HID: sony: Some cleanups Jiri Kosina

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1403609323-27283-2-git-send-email-ao2@ao2.it \
    --to=ao2@ao2.it \
    --cc=frank.praznik@oh.rr.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=simon@mungewell.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox