From patchwork Wed Apr 26 09:12:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 87765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp108935vqo; Wed, 26 Apr 2023 02:22:17 -0700 (PDT) X-Google-Smtp-Source: AKy350Y6xtkFk+WEsMvDByjCgG2ODBIAuHtxvP/c7q7F/9ywZXagvTvDU/NGZcSMwkp4I2Wlg8l+ X-Received: by 2002:a17:90b:291:b0:247:11eb:2941 with SMTP id az17-20020a17090b029100b0024711eb2941mr20750691pjb.37.1682500936859; Wed, 26 Apr 2023 02:22:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682500936; cv=none; d=google.com; s=arc-20160816; b=vI6KJNyCRk+esK4qtRQ0rih6JD4KCL7HxccqbytJprDJi5Q1VjvrcHdQ9axw2GTOuY LDPjNCb/TfE6FbtjoR+5BiuYrDQ0I9QecoktxRhzi948d8bxCVAugIOMLcGycT3SnoWY MBlnPOkn+d66KHyHiPGlTcpN+YRdoVyzCsxT/OZFo0Dc89VVU67zz9aghzxu6P2BMxDu VaFWs0utxgQJbyRsgrLd//tLtef/dW304ZKD25uk1y0L6+U4vT/7fucgtD+M6kkeHaBY hT5+aIlk5BuLp3Ku6VC8AaVHb7LnrsKGp0EjNprL5b7WjTQz3hkxFBYe/aAiMVsYDzsE dwhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=mQK9TSaek0IhyUumlIsOAJS3PZ7m3d2pI3cWfiwZNFc=; b=pkqbWExecbuaKcNwF6mVkBTBRv5t1vLXWm8tJaWOM1BqBJQDdt62Zmzemte2WPixx3 7SqzZ8yDiQ9RUtNo/IYUrSyitLDdvAQZ3yEVYoxYq8Bc0T8RRhVkWqSzJgxGVS6yQxqH 9yG9Qk9tbPQxy6QH9y+DwamdPJJJTrrcwQ0jERRBT7Ewm6R+Z7juF4121DAAZt9isX6D P0rzcI2bu3ICAEBro2RWwCrePYoY5V80PueTEtassg+QMpUP5ItkOsBgEQ24yZdRFR/u OlZBdNo/8c1hfjUXo2a3Nkk7LHLA8tfK0n6TP4vS9uJmRvYzzc3fREiaJkSxkNKcnmCF 7ozA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pYW406mZ; dkim=neutral (no key) header.i=@linutronix.de header.b="lRYX/C8Z"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o15-20020a17090ac70f00b002476baf6b4bsi15408233pjt.149.2023.04.26.02.22.04; Wed, 26 Apr 2023 02:22:16 -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; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pYW406mZ; dkim=neutral (no key) header.i=@linutronix.de header.b="lRYX/C8Z"; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240340AbjDZJOh (ORCPT + 99 others); Wed, 26 Apr 2023 05:14:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34680 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240047AbjDZJMj (ORCPT ); Wed, 26 Apr 2023 05:12:39 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71D404226; Wed, 26 Apr 2023 02:12:35 -0700 (PDT) Date: Wed, 26 Apr 2023 09:12:32 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1682500353; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mQK9TSaek0IhyUumlIsOAJS3PZ7m3d2pI3cWfiwZNFc=; b=pYW406mZuUwIQoe110TwEWGYRnC072R20Y1Dp+CX17axv+zT+nRXCtqX1YjcQHJ5vsFEPK Wsa2wvgYbgEbQHMAcIRGmz15XuNh6fmF6gwqhCgmw7Dnumf/B6THSSd9WH2djgmR+Gb5ik nh9osI5+oGqIb2tDOB7O8xma2IH0x8veG3QpvD1zUX7dLTjnUzx3Z/Gkxzf1BX5WtONeGi a6k5h+KmzfAQUJgkOkFirybRambo7PogekRPOYn24wonjqUIeiz7Nv62D1NKuHXQLheGX+ I0wYXEFs3mOlaax0pIe/8K2hzWrApLgNvUVmdajHrDD3vlFi8jzt4lTpbQChhg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682500353; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=mQK9TSaek0IhyUumlIsOAJS3PZ7m3d2pI3cWfiwZNFc=; b=lRYX/C8ZohkKIkm6KQtT1VAZZrlkbf98/jupUls321+w4Haf8YI1ab/mf7HjWXUkU1AYF0 dJ4fKxYQWtJ2xCDQ== From: tip-bot2 for Uwe =?utf-8?q?Kleine-K=C3=B6nig?= Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: timers/core] clocksource/drivers/sh_mtu2: Mark driver as non-removable Cc: u.kleine-koenig@pengutronix.de, Daniel Lezcano , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20230313075430.2730803-2-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-2-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Message-ID: <168250035266.404.6498503358644410758.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764230102276728718?= X-GMAIL-MSGID: =?utf-8?q?1764230102276728718?= The following commit has been merged into the timers/core branch of tip: Commit-ID: 78012e3880a62e0eb130a0b5a10230162ad42a06 Gitweb: https://git.kernel.org/tip/78012e3880a62e0eb130a0b5a10230162ad42a06 Author: Uwe Kleine-König AuthorDate: Mon, 13 Mar 2023 08:54:26 +01:00 Committer: Daniel Lezcano CommitterDate: Mon, 24 Apr 2023 16:56:13 +02:00 clocksource/drivers/sh_mtu2: Mark driver as non-removable 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önig Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-2-u.kleine-koenig@pengutronix.de --- 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 169a1fc..6bd2d02 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; } -static int sh_mtu2_remove(struct platform_device *pdev) -{ - return -EBUSY; /* cannot unregister clockevent */ -} - static const struct platform_device_id sh_mtu2_id_table[] = { { "sh-mtu2", 0 }, { }, @@ -503,10 +498,10 @@ MODULE_DEVICE_TABLE(of, sh_mtu2_of_table); static struct platform_driver sh_mtu2_device_driver = { .probe = sh_mtu2_probe, - .remove = sh_mtu2_remove, .driver = { .name = "sh_mtu2", .of_match_table = of_match_ptr(sh_mtu2_of_table), + .suppress_bind_attrs = true, }, .id_table = sh_mtu2_id_table, };