linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Michal Malý" <madcatxster@devoid-pointer.net>
To: jkosina@suse.cz
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.or,
	elias.vds@gmail.com, simon@mungewell.org,
	"Michal Malý" <madcatxster@devoid-pointer.net>
Subject: [PATCH v2 15/15] HID: hid-lg: Only one of LG_FF flags can be set for a given device.
Date: Wed,  8 Apr 2015 22:56:53 +0200	[thread overview]
Message-ID: <1428526613-24239-16-git-send-email-madcatxster@devoid-pointer.net> (raw)
In-Reply-To: <1428526613-24239-1-git-send-email-madcatxster@devoid-pointer.net>

Only one of LG_FF flags can be set for a given device.

Signed-off-by: Michal Malý <madcatxster@devoid-pointer.net>
---
 drivers/hid/hid-lg.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/hid/hid-lg.c b/drivers/hid/hid-lg.c
index c3981da..f1e92bf 100644
--- a/drivers/hid/hid-lg.c
+++ b/drivers/hid/hid-lg.c
@@ -713,11 +713,11 @@ static int lg_probe(struct hid_device *hdev, const struct hid_device_id *id)
 
 	if (drv_data->quirks & LG_FF)
 		ret = lgff_init(hdev);
-	if (drv_data->quirks & LG_FF2)
+	else if (drv_data->quirks & LG_FF2)
 		ret = lg2ff_init(hdev);
-	if (drv_data->quirks & LG_FF3)
+	else if (drv_data->quirks & LG_FF3)
 		ret = lg3ff_init(hdev);
-	if (drv_data->quirks & LG_FF4)
+	else if (drv_data->quirks & LG_FF4)
 		ret = lg4ff_init(hdev);
 
 	if (ret)
-- 
2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-04-08 20:57 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 20:56 [PATCH v2 00/15] HID: hid-lg, hid-lg4ff: Mostly cleanup patches Michal Malý
2015-04-08 20:56 ` [PATCH v2 01/15] HID: hid-lg4ff: (Cleanup) Remove double underscore prefix from numeric types Michal Malý
2015-04-08 20:56 ` [PATCH v2 02/15] HID: hid-lg4ff: (Cleanup) Remove "hid_" prefix from some functions' names Michal Malý
2015-04-08 20:56 ` [PATCH v2 03/15] HID: hid-lg4ff: (Cleanup) Replace DEVICE_ATTR_RW with DEVICE_ATTR to have all internal functions prefixed with "lg4ff_" Michal Malý
2015-04-08 20:56 ` [PATCH v2 04/15] HID: hid-lg4ff: (Cleanup) Remove unused variable from the "lg4ff_device_entry" struct Michal Malý
2015-04-08 20:56 ` [PATCH v2 05/15] HID: hid-lg4ff: (Cleanup) Explicit casts from void * are not necessary Michal Malý
2015-04-08 20:56 ` [PATCH v2 06/15] HID: hid-lg4ff: Update a warning message for a case where device is incorrectly flagged to be handled by hid-lg4ff in hid-lg Michal Malý
2015-04-08 20:56 ` [PATCH v2 07/15] HID: hid-lg: Check return values from lg[N]ff_init() Michal Malý
2015-04-08 20:56 ` [PATCH v2 08/15] HID: hid-lg4ff: Make lg4ff_wheel_data a separate structure stored within lg4ff_device_entry. Adjust the initialization process accordingly Michal Malý
2015-04-08 20:56 ` [PATCH v2 09/15] HID: hid-lg4ff: Stop the hid device from lg4ff Michal Malý
2015-04-08 20:56 ` [PATCH v2 10/15] HID: hid-lg4ff: Protect concurrent access to output HID report with a spinlock Michal Malý
2015-04-08 20:56 ` [PATCH v2 11/15] HID: hid-lg4ff: Store pointer to the output HID report struct in the device entry struct Michal Malý
2015-04-08 20:56 ` [PATCH v2 12/15] HID: hid-lg4ff: Constify those members of lg4ff_device_entry struct whose value is not supposed to change Michal Malý
2015-04-08 20:56 ` [PATCH v2 13/15] HID: hid-lg4ff: Allow the driver to continue without sysfs interface Michal Malý
2015-04-08 20:56 ` [PATCH v2 14/15] HID: hid-lg4ff: Update respective sysfs interface documentation Michal Malý
2015-04-08 20:56 ` Michal Malý [this message]
2015-04-10 21:09 ` [PATCH v2 00/15] HID: hid-lg, hid-lg4ff: Mostly cleanup patches Jiri Kosina
2015-05-07 14:29 ` 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=1428526613-24239-16-git-send-email-madcatxster@devoid-pointer.net \
    --to=madcatxster@devoid-pointer.net \
    --cc=elias.vds@gmail.com \
    --cc=jkosina@suse.cz \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.or \
    --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;
as well as URLs for NNTP newsgroup(s).