Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1773613rwb; Sun, 2 Oct 2022 07:45:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4uPHzAj5EVw8tvH1qk/t2qJPe+v7cWon1LG+bypI0tv5kmMB3inarghKyDnmb4jIu+mOic X-Received: by 2002:a05:6a00:3390:b0:547:d32e:b5d3 with SMTP id cm16-20020a056a00339000b00547d32eb5d3mr18309545pfb.23.1664721905522; Sun, 02 Oct 2022 07:45:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664721905; cv=none; d=google.com; s=arc-20160816; b=j17UqOaHYInMke7QSKdBppDgTwbhGkzls3R+vlSGzOSwRMPLi5Y+bzKXVLBGzbDDOT fEQVI+jlRLLKVooCzXgIhiGOTgvoxuKXjExm0Qp9visbVzFs0gpv8sBKdFjLviaErqO8 QUZeXHsXYxHH2sZbAM7N7P/SAehtWWLAWEWNRd4QkEpzPgeUzf9D1QxEwRGop6PDOXma z5Di1UUxstUT6eP4Uf8hQ16gUR/W0dawa4IHvE6KzabSFYys9C+V07qvrhoAH/fBfX4W yaCCv1cSVmVFaI0Wqo22ngSXqUZlQCk0i07qmtMjv6Kx5c1j/NmQ+fv4Ee4WEWQu07KG w4ug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=vGk2Yh5RL/va6DNzMlyIE5CPcORZHFGSrD2S1LuGUrI=; b=cV++9pscmURk2Rv8DvdqDKT/ntBu5U/tZ30iiEe4v5eeO+LBgJFo51bW8ygGfOudzC qtru8EC79bsx1clrTtgUrxuduyD2zutOriB4kXaQj2pU1pf0HZdImK31x+pT80GGsR8e 7g+0Xu9dTN7nfGCzXujmSuQgdURe4lGHKEbEliFTSkjPJcnwCFnzQXaPqOz5VNLY7Qaa HYZkACSvZ3inVHvYRh+4iUCe7mrKFnz1yI8gUF+sgfI6Lqsjbk7kemtP8h1DpXnzEDu1 2K3qhPF0gN+D0dfBBoYRWJ5suZVaTf1Uow4ZYt9NzVEytuwa5ExWN50CpkKGL7GLkiXK IQug== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h21-20020a056a001a5500b005453554828bsi8308720pfv.204.2022.10.02.07.44.53; Sun, 02 Oct 2022 07:45:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229831AbiJBOie (ORCPT + 99 others); Sun, 2 Oct 2022 10:38:34 -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: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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, -- 2.34.1