From patchwork Sun Oct 2 14:38:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 611958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 007BBC4332F for ; Sun, 2 Oct 2022 14:38:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229805AbiJBOid (ORCPT ); Sun, 2 Oct 2022 10:38:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229777AbiJBOib (ORCPT ); Sun, 2 Oct 2022 10:38:31 -0400 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 26B5E42AE5 for ; Sun, 2 Oct 2022 07:38:30 -0700 (PDT) Received: from pop-os.home ([86.243.100.34]) by smtp.orange.fr with ESMTPA id f06toNPoWUoLVf06to0bsI; Sun, 02 Oct 2022 16:38:28 +0200 X-ME-Helo: pop-os.home X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 02 Oct 2022 16:38:28 +0200 X-ME-IP: 86.243.100.34 From: Christophe JAILLET To: Jiri Kosina , Benjamin Tissoires Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-input@vger.kernel.org Subject: [PATCH] HID: alps: Simplify the .remove function Date: Sun, 2 Oct 2022 16:38:26 +0200 Message-Id: <33cf94ec234b88ffc79eb4496c640093aa8c5e70.1664721476.git.christophe.jaillet@wanadoo.fr> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org If the .remove function of a 'hid_driver' is NULL, the default behavior is to call hid_hw_stop(). So alps_remove() can be removed here, it is just hand-writing what already exists. Signed-off-by: Christophe JAILLET --- drivers/hid/hid-alps.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/drivers/hid/hid-alps.c b/drivers/hid/hid-alps.c index db146d0f7937..669d769ea1dc 100644 --- a/drivers/hid/hid-alps.c +++ b/drivers/hid/hid-alps.c @@ -820,11 +820,6 @@ static int alps_probe(struct hid_device *hdev, const struct hid_device_id *id) return 0; } -static void alps_remove(struct hid_device *hdev) -{ - hid_hw_stop(hdev); -} - static const struct hid_device_id alps_id[] = { { HID_DEVICE(HID_BUS_ANY, HID_GROUP_ANY, USB_VENDOR_ID_ALPS_JP, HID_DEVICE_ID_ALPS_U1_DUAL) }, @@ -842,7 +837,6 @@ static struct hid_driver alps_driver = { .name = "hid-alps", .id_table = alps_id, .probe = alps_probe, - .remove = alps_remove, .raw_event = alps_raw_event, .input_mapping = alps_input_mapping, .input_configured = alps_input_configured,