From nobody Wed Feb 11 17:24:19 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 4DE9EC61DA4 for ; Mon, 13 Mar 2023 07:56:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230337AbjCMH4y (ORCPT ); Mon, 13 Mar 2023 03:56:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229927AbjCMH4Y (ORCPT ); Mon, 13 Mar 2023 03:56:24 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D33024BE2 for ; Mon, 13 Mar 2023 00:54:41 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pbd0w-0001j7-E3; Mon, 13 Mar 2023 08:54:38 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pbd0v-003nab-IO; Mon, 13 Mar 2023 08:54:37 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.94.2) (envelope-from ) id 1pbd0u-004TOa-TW; Mon, 13 Mar 2023 08:54:36 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Daniel Lezcano , Thomas Gleixner Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/5] clocksource: sh_mtu2: Mark driver as non-removable Date: Mon, 13 Mar 2023 08:54:26 +0100 Message-Id: <20230313075430.2730803-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-1-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Developer-Signature: v=1; a=openpgp-sha256; l=1514; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=jqp6GOMjSpdCmxIeDGA+mPUOdQcsY6oyMOjjcWRDVUc=; b=owEBbQGS/pANAwAKAcH8FHityuwJAcsmYgBkDtamyYLCZb7RA67Pd0H1tRCDLB8Z9mshljoqR fIrbRirSreJATMEAAEKAB0WIQR+cioWkBis/z50pAvB/BR4rcrsCQUCZA7WpgAKCRDB/BR4rcrs CeirB/9d9M2QhXLH2MlvVnu6W3F8eUc5j9eAVNlOVHW5GUYGTTdANh5pqKxOBhEHx8KKIeLBTEB XpesoDuc3EJ0TqhsC9VQfsiPBNXUOVL8idLaMVCirR/fq1ROX6LRdQdXbtoGfDl5Mjz8RO/A9OL FbckDAI6HY7PCod4ycEW4C9lFycNfGAxQK+mk4RlhEWI0OJFn9Xqa2qLHv0J6YfEsn4qiCyZvUs Z3KwDmeQR4/mcVSA4svEkEGOhoddqnaj4cvqr4zJmrBqA4tBDFJInwklrH3E5fcY2VPpFA6n6Uq 5ucUyd/8ybZiuTQok+YBLfA8HSpNPb00gk8Ik1pS6tKIg4w0 X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: quoted-printable X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The comment in the remove callback suggests that the driver is not supposed to be unbound. However returning an error code in the remove callback doesn't accomplish that. Instead set the suppress_bind_attrs property (which makes it impossible to unbind the driver via sysfs). The only remaining way to unbind a sh_tmu2 device would be module unloading, but that doesn't apply here, as the driver cannot be built as a module. Also drop the useless remove callback. Signed-off-by: Uwe Kleine-K=C3=B6nig --- drivers/clocksource/sh_mtu2.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c index 169a1fccc497..6bd2d0299397 100644 --- a/drivers/clocksource/sh_mtu2.c +++ b/drivers/clocksource/sh_mtu2.c @@ -484,11 +484,6 @@ static int sh_mtu2_probe(struct platform_device *pdev) return 0; } =20 -static int sh_mtu2_remove(struct platform_device *pdev) -{ - return -EBUSY; /* cannot unregister clockevent */ -} - static const struct platform_device_id sh_mtu2_id_table[] =3D { { "sh-mtu2", 0 }, { }, @@ -503,10 +498,10 @@ MODULE_DEVICE_TABLE(of, sh_mtu2_of_table); =20 static struct platform_driver sh_mtu2_device_driver =3D { .probe =3D sh_mtu2_probe, - .remove =3D sh_mtu2_remove, .driver =3D { .name =3D "sh_mtu2", .of_match_table =3D of_match_ptr(sh_mtu2_of_table), + .suppress_bind_attrs =3D true, }, .id_table =3D sh_mtu2_id_table, }; --=20 2.39.1