From patchwork Sat Mar 21 11:47:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Michal_Mal=C3=BD?= X-Patchwork-Id: 6063891 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8B4189F314 for ; Sat, 21 Mar 2015 11:48:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BDD94202EB for ; Sat, 21 Mar 2015 11:48:51 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E3EA2202E6 for ; Sat, 21 Mar 2015 11:48:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751869AbbCULst (ORCPT ); Sat, 21 Mar 2015 07:48:49 -0400 Received: from smtp.devoid-pointer.net ([31.31.77.140]:59578 "EHLO smtp.devoid-pointer.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751799AbbCULsZ (ORCPT ); Sat, 21 Mar 2015 07:48:25 -0400 Received: from Labrat.localdomain.localdomain (228.123.broadband5.iol.cz [88.100.123.228]) (using TLSv1.2 with cipher AES128-SHA256 (128/128 bits)) (No client certificate requested) by smtp.devoid-pointer.net (Postfix) with ESMTPSA id 3573921A31; Sat, 21 Mar 2015 12:48:15 +0100 (CET) From: =?UTF-8?q?Michal=20Mal=C3=BD?= To: jkosina@suse.cz Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, elias.vds@gmail.com, simon@mungewell.org, =?UTF-8?q?Michal=20Mal=C3=BD?= Subject: [PATCH 12/12] HID: hid-lg: Only one of LG_FF flags can be set for a given device. Date: Sat, 21 Mar 2015 12:47:42 +0100 Message-Id: <1426938462-884-13-git-send-email-madcatxster@devoid-pointer.net> X-Mailer: git-send-email 2.3.3 In-Reply-To: <1426938462-884-1-git-send-email-madcatxster@devoid-pointer.net> References: <1426938462-884-1-git-send-email-madcatxster@devoid-pointer.net> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reflect the mutual exclusivity of the LG_FF flags in the code. Signed-off-by: Michal MalĂ˝ --- 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)