From patchwork Mon Jul 23 15:03:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanno Zulla X-Patchwork-Id: 10540483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9D18B14BC for ; Mon, 23 Jul 2018 15:03:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8BF6D20243 for ; Mon, 23 Jul 2018 15:03:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8010B26490; Mon, 23 Jul 2018 15:03:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 02FBB20243 for ; Mon, 23 Jul 2018 15:03:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388099AbeGWQF3 (ORCPT ); Mon, 23 Jul 2018 12:05:29 -0400 Received: from zoot.epublica.de ([78.46.103.157]:49678 "EHLO zoot.epublica.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388070AbeGWQF3 (ORCPT ); Mon, 23 Jul 2018 12:05:29 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zoot.epublica.de (Postfix) with ESMTP id 825681841771; Mon, 23 Jul 2018 17:03:49 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zoot.epublica.de Received: from zoot.epublica.de ([127.0.0.1]) by localhost (zoot.epublica.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xgEvLmG4ghRG; Mon, 23 Jul 2018 17:03:48 +0200 (CEST) Received: from [10.1.0.41] (ip1f103e43.dynamic.kabel-deutschland.de [31.16.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zoot.epublica.de (Postfix) with ESMTPSA id 7B8691841770; Mon, 23 Jul 2018 17:03:48 +0200 (CEST) Subject: [PATCH v2 1/5] HID: hid-betopff.c: Refactor code to fix error handling (1/3) From: Hanno Zulla To: huangbobupt@163.com Cc: Jiri Kosina , Benjamin Tissoires , linux-input References: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> Message-ID: <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> Date: Mon, 23 Jul 2018 17:03:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> Content-Language: de-LU Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID: hid-betopff.c: Refactor code to fix error handling (1/3) The driver's betopff_probe() calls betopff_init(), but then doesn't handle the returned errors. This is a minor refactoring to fold both functions into one and bring back error handling. Signed-off-by: Hanno Zulla --- drivers/hid/hid-betopff.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index 69cfc8dc6af1..5b4c9e9d26ae 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -59,15 +59,13 @@ static int betopff_init(struct hid_device *hid) { struct betopff_device *betopff; struct hid_report *report; - struct hid_input *hidinput = - list_first_entry(&hid->inputs, struct hid_input, list); - struct list_head *report_list = - &hid->report_enum[HID_OUTPUT_REPORT].report_list; - struct input_dev *dev = hidinput->input; + struct hid_input *hidinput; + struct list_head *report_list; int field_count = 0; int error; int i, j; + report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; if (list_empty(report_list)) { hid_err(hid, "no output reports found\n"); return -ENODEV; @@ -99,9 +97,11 @@ static int betopff_init(struct hid_device *hid) if (!betopff) return -ENOMEM; - set_bit(FF_RUMBLE, dev->ffbit); + hidinput = list_first_entry(&hid->inputs, struct hid_input, list); + set_bit(FF_RUMBLE, hidinput->input->ffbit); - error = input_ff_create_memless(dev, betopff, hid_betopff_play); + error = input_ff_create_memless(hidinput->input, + betopff, hid_betopff_play); if (error) { kfree(betopff); return error; From patchwork Mon Jul 23 15:04:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanno Zulla X-Patchwork-Id: 10540485 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91EF9157A for ; Mon, 23 Jul 2018 15:04:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 80076204FB for ; Mon, 23 Jul 2018 15:04:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 726ED27F97; Mon, 23 Jul 2018 15:04:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 191D0204FB for ; Mon, 23 Jul 2018 15:04:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388047AbeGWQGW (ORCPT ); Mon, 23 Jul 2018 12:06:22 -0400 Received: from zoot.epublica.de ([78.46.103.157]:49726 "EHLO zoot.epublica.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387963AbeGWQGW (ORCPT ); Mon, 23 Jul 2018 12:06:22 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zoot.epublica.de (Postfix) with ESMTP id 7A7811841775; Mon, 23 Jul 2018 17:04:42 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zoot.epublica.de Received: from zoot.epublica.de ([127.0.0.1]) by localhost (zoot.epublica.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id BRbLwdwec5X3; Mon, 23 Jul 2018 17:04:41 +0200 (CEST) Received: from [10.1.0.41] (ip1f103e43.dynamic.kabel-deutschland.de [31.16.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zoot.epublica.de (Postfix) with ESMTPSA id 7A9491841772; Mon, 23 Jul 2018 17:04:41 +0200 (CEST) Subject: [PATCH v2 2/5] HID: hid-betopff.c: Refactor code to fix error handling (2/3) From: Hanno Zulla To: huangbobupt@163.com Cc: Jiri Kosina , Benjamin Tissoires , linux-input References: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> Message-ID: <386e2cdd-49ec-fe4c-ead7-78dc5384cab9@hanno.de> Date: Mon, 23 Jul 2018 17:04:40 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> Content-Language: de-LU Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID: hid-betopff.c: Refactor code to fix error handling (2/3) The driver's betopff_probe() calls betopff_init(), but then doesn't handle the returned errors. This is a minor refactoring to fold both functions into one and bring back error handling. Signed-off-by: Hanno Zulla --- drivers/hid/hid-betopff.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index 5b4c9e9d26ae..0ba58f748239 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -55,7 +55,7 @@ static int hid_betopff_play(struct input_dev *dev, void *data, return 0; } -static int betopff_init(struct hid_device *hid) +static int betopff_init(struct hid_device *hdev) { struct betopff_device *betopff; struct hid_report *report; @@ -65,9 +65,9 @@ static int betopff_init(struct hid_device *hid) int error; int i, j; - report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; + report_list = &hdev->report_enum[HID_OUTPUT_REPORT].report_list; if (list_empty(report_list)) { - hid_err(hid, "no output reports found\n"); + hid_err(hdev, "no output reports found\n"); return -ENODEV; } @@ -88,7 +88,7 @@ static int betopff_init(struct hid_device *hid) } if (field_count < 4) { - hid_err(hid, "not enough fields in the report: %d\n", + hid_err(hdev, "not enough fields in the report: %d\n", field_count); return -ENODEV; } @@ -97,7 +97,7 @@ static int betopff_init(struct hid_device *hid) if (!betopff) return -ENOMEM; - hidinput = list_first_entry(&hid->inputs, struct hid_input, list); + hidinput = list_first_entry(&hdev->inputs, struct hid_input, list); set_bit(FF_RUMBLE, hidinput->input->ffbit); error = input_ff_create_memless(hidinput->input, @@ -108,9 +108,9 @@ static int betopff_init(struct hid_device *hid) } betopff->report = report; - hid_hw_request(hid, betopff->report, HID_REQ_SET_REPORT); + hid_hw_request(hdev, betopff->report, HID_REQ_SET_REPORT); - hid_info(hid, "Force feedback for betop devices by huangbo \n"); + hid_info(hdev, "Force feedback for betop devices by huangbo \n"); return 0; } From patchwork Mon Jul 23 15:05:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanno Zulla X-Patchwork-Id: 10540487 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 947B0157A for ; Mon, 23 Jul 2018 15:05:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 83616204FB for ; Mon, 23 Jul 2018 15:05:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 77DF92864A; Mon, 23 Jul 2018 15:05:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7112A204FB for ; Mon, 23 Jul 2018 15:05:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388176AbeGWQHZ (ORCPT ); Mon, 23 Jul 2018 12:07:25 -0400 Received: from zoot.epublica.de ([78.46.103.157]:49802 "EHLO zoot.epublica.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387852AbeGWQHZ (ORCPT ); Mon, 23 Jul 2018 12:07:25 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zoot.epublica.de (Postfix) with ESMTP id EA3A41841773; Mon, 23 Jul 2018 17:05:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zoot.epublica.de Received: from zoot.epublica.de ([127.0.0.1]) by localhost (zoot.epublica.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jqneecZY_qvy; Mon, 23 Jul 2018 17:05:44 +0200 (CEST) Received: from [10.1.0.41] (ip1f103e43.dynamic.kabel-deutschland.de [31.16.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zoot.epublica.de (Postfix) with ESMTPSA id 11C6E1841772; Mon, 23 Jul 2018 17:05:44 +0200 (CEST) Subject: [PATCH v2 3/5] HID: hid-betopff.c: Refactor code to fix error handling (3/3) From: Hanno Zulla To: huangbobupt@163.com Cc: Jiri Kosina , Benjamin Tissoires , linux-input References: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> <386e2cdd-49ec-fe4c-ead7-78dc5384cab9@hanno.de> Message-ID: <05803eec-3fa5-61fb-2129-991b15bc8618@hanno.de> Date: Mon, 23 Jul 2018 17:05:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <386e2cdd-49ec-fe4c-ead7-78dc5384cab9@hanno.de> Content-Language: de-LU Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID: hid-betopff.c: Refactor code to fix error handling (3/3) The driver's betopff_probe() calls betopff_init(), but then doesn't handle the returned errors. This is a minor refactoring to fold both functions into one and bring back error handling. Signed-off-by: Hanno Zulla --- drivers/hid/hid-betopff.c | 43 +++++++++++++++------------------------ 1 file changed, 16 insertions(+), 27 deletions(-) diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index 0ba58f748239..e4e9cbe44515 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -55,7 +55,7 @@ static int hid_betopff_play(struct input_dev *dev, void *data, return 0; } -static int betopff_init(struct hid_device *hdev) +static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id) { struct betopff_device *betopff; struct hid_report *report; @@ -65,6 +65,21 @@ static int betopff_init(struct hid_device *hdev) int error; int i, j; + if (id->driver_data) + hdev->quirks |= HID_QUIRK_MULTI_INPUT; + + error = hid_parse(hdev); + if (error) { + hid_err(hdev, "parse failed\n"); + return error; + } + + error = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); + if (error) { + hid_err(hdev, "hw start failed\n"); + return error; + } + report_list = &hdev->report_enum[HID_OUTPUT_REPORT].report_list; if (list_empty(report_list)) { hid_err(hdev, "no output reports found\n"); @@ -115,32 +130,6 @@ static int betopff_init(struct hid_device *hdev) return 0; } -static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id) -{ - int ret; - - if (id->driver_data) - hdev->quirks |= HID_QUIRK_MULTI_INPUT; - - ret = hid_parse(hdev); - if (ret) { - hid_err(hdev, "parse failed\n"); - goto err; - } - - ret = hid_hw_start(hdev, HID_CONNECT_DEFAULT & ~HID_CONNECT_FF); - if (ret) { - hid_err(hdev, "hw start failed\n"); - goto err; - } - - betopff_init(hdev); - - return 0; -err: - return ret; -} - static const struct hid_device_id betop_devices[] = { { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185BFM, 0x2208) }, { HID_USB_DEVICE(USB_VENDOR_ID_BETOP_2185PC, 0x5506) }, From patchwork Mon Jul 23 15:06:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanno Zulla X-Patchwork-Id: 10540489 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9CF1314BC for ; Mon, 23 Jul 2018 15:07:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 891E320243 for ; Mon, 23 Jul 2018 15:07:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 73F7A28498; Mon, 23 Jul 2018 15:07:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2132327FB0 for ; Mon, 23 Jul 2018 15:07:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387966AbeGWQIj (ORCPT ); Mon, 23 Jul 2018 12:08:39 -0400 Received: from zoot.epublica.de ([78.46.103.157]:49872 "EHLO zoot.epublica.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387852AbeGWQIj (ORCPT ); Mon, 23 Jul 2018 12:08:39 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zoot.epublica.de (Postfix) with ESMTP id 97EC718400A6; Mon, 23 Jul 2018 17:06:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zoot.epublica.de Received: from zoot.epublica.de ([127.0.0.1]) by localhost (zoot.epublica.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5LwdlWG4SyhF; Mon, 23 Jul 2018 17:06:57 +0200 (CEST) Received: from [10.1.0.41] (ip1f103e43.dynamic.kabel-deutschland.de [31.16.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zoot.epublica.de (Postfix) with ESMTPSA id 524FA18405BB; Mon, 23 Jul 2018 17:06:57 +0200 (CEST) Subject: [PATCH v2 4/5] HID: hid-betopff.c: Allocate mem before hid_parse, use devm_kzalloc() From: Hanno Zulla To: huangbobupt@163.com Cc: Jiri Kosina , Benjamin Tissoires , linux-input References: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> <386e2cdd-49ec-fe4c-ead7-78dc5384cab9@hanno.de> <05803eec-3fa5-61fb-2129-991b15bc8618@hanno.de> Message-ID: <540730a4-cc4b-666a-505e-79980e6332ce@hanno.de> Date: Mon, 23 Jul 2018 17:06:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <05803eec-3fa5-61fb-2129-991b15bc8618@hanno.de> Content-Language: de-LU Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID: hid-betopff.c: Allocate mem before hid_parse, use devm_kzalloc() The driver's betopff struct should be allocated prior to parsing. With devm_kzalloc() the use of kfree() turns obsolete and error handling is simplified. Signed-off-by: Hanno Zulla --- drivers/hid/hid-betopff.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index e4e9cbe44515..9edbdad5264e 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -65,6 +65,10 @@ static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id) int error; int i, j; + betopff = devm_kzalloc(&hdev->dev, sizeof(*betopff), GFP_KERNEL); + if (!betopff) + return -ENOMEM; + if (id->driver_data) hdev->quirks |= HID_QUIRK_MULTI_INPUT; @@ -108,17 +112,12 @@ static int betop_probe(struct hid_device *hdev, const struct hid_device_id *id) return -ENODEV; } - betopff = kzalloc(sizeof(*betopff), GFP_KERNEL); - if (!betopff) - return -ENOMEM; - hidinput = list_first_entry(&hdev->inputs, struct hid_input, list); set_bit(FF_RUMBLE, hidinput->input->ffbit); error = input_ff_create_memless(hidinput->input, betopff, hid_betopff_play); if (error) { - kfree(betopff); return error; } From patchwork Mon Jul 23 15:07:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hanno Zulla X-Patchwork-Id: 10540491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 91D95157A for ; Mon, 23 Jul 2018 15:07:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7ED1A28A60 for ; Mon, 23 Jul 2018 15:07:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 71FF728AAB; Mon, 23 Jul 2018 15:07:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1831E28A60 for ; Mon, 23 Jul 2018 15:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387859AbeGWQJd (ORCPT ); Mon, 23 Jul 2018 12:09:33 -0400 Received: from zoot.epublica.de ([78.46.103.157]:49930 "EHLO zoot.epublica.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387852AbeGWQJd (ORCPT ); Mon, 23 Jul 2018 12:09:33 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by zoot.epublica.de (Postfix) with ESMTP id B82E51841773; Mon, 23 Jul 2018 17:07:52 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at zoot.epublica.de Received: from zoot.epublica.de ([127.0.0.1]) by localhost (zoot.epublica.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PnM0R8mLhr1e; Mon, 23 Jul 2018 17:07:52 +0200 (CEST) Received: from [10.1.0.41] (ip1f103e43.dynamic.kabel-deutschland.de [31.16.62.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by zoot.epublica.de (Postfix) with ESMTPSA id CF34E18405BB; Mon, 23 Jul 2018 17:07:51 +0200 (CEST) Subject: [PATCH v2 5/5] HID: hid-betopff.c: Add SPDX-License-Identifier From: Hanno Zulla To: huangbobupt@163.com Cc: Jiri Kosina , Benjamin Tissoires , linux-input References: <84e73143-a5da-9e8d-4ec8-ce425e1b4699@hanno.de> <3865de51-b659-c24f-6394-6934f004dccd@hanno.de> <386e2cdd-49ec-fe4c-ead7-78dc5384cab9@hanno.de> <05803eec-3fa5-61fb-2129-991b15bc8618@hanno.de> <540730a4-cc4b-666a-505e-79980e6332ce@hanno.de> Message-ID: <69c91137-8da1-79c2-8496-7245619536ce@hanno.de> Date: Mon, 23 Jul 2018 17:07:51 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <540730a4-cc4b-666a-505e-79980e6332ce@hanno.de> Content-Language: de-LU Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP HID: hid-betopff.c: Add SPDX-License-Identifier Removes some boilerplate licensing text. Signed-off-by: Hanno Zulla --- drivers/hid/hid-betopff.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/hid/hid-betopff.c b/drivers/hid/hid-betopff.c index 9edbdad5264e..b02d2b3cda29 100644 --- a/drivers/hid/hid-betopff.c +++ b/drivers/hid/hid-betopff.c @@ -1,3 +1,5 @@ +// SPDX-License-Identifier: GPL-2.0+ + /* * Force feedback support for Betop based devices * @@ -15,17 +17,10 @@ * * 0x20bc:0x5500 "BTP2185 V2 BFM mode Joystick" * - tested with BTP2171s. + * * Copyright (c) 2014 Huang Bo */ -/* - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. - */ - - #include #include #include