From nobody Mon Apr 6 14:59:42 2026 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 37D3EC433FE for ; Sun, 2 Oct 2022 14:38:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229863AbiJBOif (ORCPT ); Sun, 2 Oct 2022 10:38:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229766AbiJBOib (ORCPT ); Sun, 2 Oct 2022 10:38:31 -0400 Received: from smtp.smtpout.orange.fr (smtp08.smtpout.orange.fr [80.12.242.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 115DB41990 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 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" 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 s= truct hid_device_id *id) return 0; } =20 -static void alps_remove(struct hid_device *hdev) -{ - hid_hw_stop(hdev); -} - static const struct hid_device_id alps_id[] =3D { { 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 =3D { .name =3D "hid-alps", .id_table =3D alps_id, .probe =3D alps_probe, - .remove =3D alps_remove, .raw_event =3D alps_raw_event, .input_mapping =3D alps_input_mapping, .input_configured =3D alps_input_configured, --=20 2.34.1