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: 87756 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp105812vqo; Wed, 26 Apr 2023 02:14:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5IyQ1eTyUWGcjZ1cNfejRtMmqLg1n0B9zkCqWnnq83asCdk21N6JIcMbkoui2GWeBF1xZD X-Received: by 2002:a17:903:1245:b0:1a9:96d0:f73c with SMTP id u5-20020a170903124500b001a996d0f73cmr4071627plh.20.1682500460409; Wed, 26 Apr 2023 02:14:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682500460; cv=none; d=google.com; s=arc-20160816; b=Cq1aK5WZrT+uJvvVR8nKBNxSnz4oMjqeHnjSNoVwQ++8moed7bp5n3a0xzQsHx5le7 vraQ/rzA+NSKuKBvqIpBBO9eT1eKA1YaYmb74Htf72cdLipfQC5BdIS7jcOd3qwEHiLv cEj5y9zKBk4BUf/JYD4pzCrbFhHEPNUfeCIvoEQcciVKNR0frQ7NOETcUZ57yJRl4WrL bw9H7o33I30GN0f3xPprWTwrreWiHyLuAT1yerJ6sopjoZzvtpfD+z3NfGGiJTUZKxBR G5ZYIiPRbM1c0GZCi87FyGYYktn78CoWPKYdIY+s8YhMoWTyQAM1r6wAMbEDwRRfJk5P ofOw== 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=NNXgzTy+QeO7E1VlP5wXZTqBLDL997Vo79lkZlCNccM=; b=eXXiCUSsYrVGh/r5wWGTH3KI38M1WhSuespWvHP7pRzGiRRkHqpqRn59QO4ktCCCmm Q2u0ZpwkUaC2EG7/tZN5CM6MleI0t9rUqapUXk6hdg9vR0iB8l1BSjbg+KmEIEO8kfds pNnhlI9ttO20zW0v2CKogOHXs/4eoHKWrRyLNKlgyX2Iy2nRqyfEBQn4JQ9uG6VrJrpV e6OXYPsQZcg87upCz6xzT+bc2/fICg8y7KKgGwX70r9aW+R/NdELRFG/4W8yKSRxxa+M MLrqPFzGie6alWI5tPtj2t35I5ZRw+ON6ihCnhKc4m75UjpSBuRq+gjygcIcFuTqKjSR sa6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UNWDPUua; dkim=neutral (no key) header.i=@linutronix.de header.b=HgS3za8w; 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 p10-20020a170902780a00b001a235350e69si14728324pll.104.2023.04.26.02.14.05; Wed, 26 Apr 2023 02:14:20 -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=UNWDPUua; dkim=neutral (no key) header.i=@linutronix.de header.b=HgS3za8w; 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 S240238AbjDZJNg (ORCPT + 99 others); Wed, 26 Apr 2023 05:13:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240046AbjDZJMj (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 7206C4487; 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=1682500352; 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=NNXgzTy+QeO7E1VlP5wXZTqBLDL997Vo79lkZlCNccM=; b=UNWDPUuaecbyJcp9fYT8D5lgD76P3pfGIrxFxm3fdKjmijtJ/8qWCEW0j3Q7blgmHPEmsu nGOtIt9x9HbggxIMW3Y885zjXSr+A2repewews/17sJ9wtZ1MBC8I7Bb0KBfSJ5/JGwWYC EQB2CY4UuxP+xWPPTlE+S4vAeYABGyhjUo5T+E/zfqtsfeCjZDMlLo8dqYfU4/0BCGi579 ol6pOX1uLdIvWAbZAZ70b6zvoc22c5GUs7RCd0uFmjhp+T76++qdZ/wifhVhNzBPu//E/P vO3Czj8AqU79XfntixsxUI6Ujxng8K0QL1Qt/Btwf7/NLLVWCLmJ6ZgtQjRG7g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1682500352; 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=NNXgzTy+QeO7E1VlP5wXZTqBLDL997Vo79lkZlCNccM=; b=HgS3za8wZeC+yB4jFTLqXmJwwh9JEmgVtg4BatkDHaxH5ywA8SSJP1W7XgNJmV8Q8dE0Ht 5aS73n0zsGY0ZDAQ== 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/timer-stm32-lp: 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-3-u.kleine-koenig@pengutronix.de> References: <20230313075430.2730803-3-u.kleine-koenig@pengutronix.de> MIME-Version: 1.0 Message-ID: <168250035240.404.8830089641941944537.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?1764229602491855815?= X-GMAIL-MSGID: =?utf-8?q?1764229602491855815?= The following commit has been merged into the timers/core branch of tip: Commit-ID: ede38f924a9e3c60382a13576347dc41967e8762 Gitweb: https://git.kernel.org/tip/ede38f924a9e3c60382a13576347dc41967e8762 Author: Uwe Kleine-König AuthorDate: Mon, 13 Mar 2023 08:54:27 +01:00 Committer: Daniel Lezcano CommitterDate: Mon, 24 Apr 2023 16:56:13 +02:00 clocksource/drivers/timer-stm32-lp: 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 an stm32-lp 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. [dlezcano] : Fixed up the wrong function removed Signed-off-by: Uwe Kleine-König Signed-off-by: Daniel Lezcano Link: https://lore.kernel.org/r/20230313075430.2730803-3-u.kleine-koenig@pengutronix.de --- drivers/clocksource/timer-stm32-lp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/clocksource/timer-stm32-lp.c b/drivers/clocksource/timer-stm32-lp.c index db2841d..0adf22d 100644 --- a/drivers/clocksource/timer-stm32-lp.c +++ b/drivers/clocksource/timer-stm32-lp.c @@ -195,11 +195,6 @@ out_clk_disable: return ret; } -static int stm32_clkevent_lp_remove(struct platform_device *pdev) -{ - return -EBUSY; /* cannot unregister clockevent */ -} - static const struct of_device_id stm32_clkevent_lp_of_match[] = { { .compatible = "st,stm32-lptimer-timer", }, {}, @@ -207,11 +202,11 @@ static const struct of_device_id stm32_clkevent_lp_of_match[] = { MODULE_DEVICE_TABLE(of, stm32_clkevent_lp_of_match); static struct platform_driver stm32_clkevent_lp_driver = { - .probe = stm32_clkevent_lp_probe, - .remove = stm32_clkevent_lp_remove, + .probe = stm32_clkevent_lp_probe, .driver = { .name = "stm32-lptimer-timer", .of_match_table = of_match_ptr(stm32_clkevent_lp_of_match), + .suppress_bind_attrs = true, }, }; module_platform_driver(stm32_clkevent_lp_driver);