Received: by 2002:a05:6358:53a8:b0:117:f937:c515 with SMTP id z40csp448941rwe; Wed, 19 Apr 2023 00:55:38 -0700 (PDT) X-Google-Smtp-Source: AKy350bZaJdbXiPbQi9UsGoRvHxRDsjbNHSAhVkdDUIvee9f96E7PKKqBMB8TI5kR0ZRxgKmS4xI X-Received: by 2002:a05:6a00:1a89:b0:63b:62d1:d868 with SMTP id e9-20020a056a001a8900b0063b62d1d868mr2852797pfv.8.1681890938560; Wed, 19 Apr 2023 00:55:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681890938; cv=none; d=google.com; s=arc-20160816; b=Gjb1Vtnc41Q5VSTpvmZlA4Oq7UCTyWUEVZ8JzP23TN35XB1xB9PN7xm9Vr4xHDjJwO mm1eEmYqK0ETIfJpYhnD79xN4SPwGZfskvH19OJ1cIP2xAi9/SUbh5JMReAdJQ7eKlgJ x6VxHNls1hiQCYhstNFywZ8Y5EUB0dzSg+zfLqDR0SLAMiU/cZ1DrRaIw2PUnOg9QKHq 9RsejMVSzW005zeaUlELHChHa93WbkgYgRvI1dpLesYE1c2k8GE5JT70fHJ3xRKw5CtZ Owl3AbUi4E3slnuyhCG5xEAlwr51w+RC5ADKJRsPblyMyJor9tdAF9fVIA9VyRXPhG29 gyeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=VDM/X9Rv4Dnk0OZyDBmi3fSTCK369lUNj0HJzi93FoY=; b=jyvydnMkYOENSFrtBxlFsy6DR/Y7LLS2zy67z2GpcDs723SOXjvgj5taUxFdlSOlG2 PE/vo7wpvCJGgKxqTGc8k6h0U4/HLz8gyBI6me5HGxWxq9EBaRxMuhniVasbCUi/ETfQ qm1zysTATxdw2faS7IFbV29PY5zTNWyXXJV1MLpeUCXSSMYCWt7j4pZHpeeO6YqqRobk ABIuXCfxSImk5HM4FrXXN7fRpZAPocdEH0PpUV7gSsXLpBL6gU+bePqFQib39rsOzM7J 4yZTL6LGuQX7UkbNZOn/fKms4wEBQDEkNw92WgLGulf4ns77xuWo6NGhIwQVcQkLnCeG NOxg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=adiFAyzq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k1-20020aa79d01000000b0063b716685fasi11610638pfp.235.2023.04.19.00.55.27; Wed, 19 Apr 2023 00:55:38 -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=@mediatek.com header.s=dk header.b=adiFAyzq; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232561AbjDSHuC (ORCPT + 99 others); Wed, 19 Apr 2023 03:50:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232502AbjDSHty (ORCPT ); Wed, 19 Apr 2023 03:49:54 -0400 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E162097 for ; Wed, 19 Apr 2023 00:49:52 -0700 (PDT) X-UUID: c0e726b4de8611edb6b9f13eb10bd0fe-20230419 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=VDM/X9Rv4Dnk0OZyDBmi3fSTCK369lUNj0HJzi93FoY=; b=adiFAyzq+ZjW9+m0qGf8IHZcH8ishYYM2G+4scEhxdQ6Wd/Y2RzoYhr61PUYmwUukfTZyBoy1EtKr7+tCzI1odLDQf5rMc2ajow4ZPGcMKf2r7odYO1B1T0IlnHqUCMTC1rNIjdAXxK1LS3xLpHtlOQ8O/HxHP4zHALIe6wXYh0=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:af9121f2-760f-45c8-804a-ed1cff4cc518,IP:0,U RL:0,TC:0,Content:-5,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION :release,TS:-5 X-CID-META: VersionHash:120426c,CLOUDID:39eb76eb-db6f-41fe-8b83-13fe7ed1ef52,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0,AV:0 X-CID-BVR: 0,NGT X-CID-BAS: 0,NGT,0,_ X-UUID: c0e726b4de8611edb6b9f13eb10bd0fe-20230419 Received: from mtkmbs10n2.mediatek.inc [(172.21.101.183)] by mailgw02.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 823981223; Wed, 19 Apr 2023 15:49:46 +0800 Received: from mtkmbs13n2.mediatek.inc (172.21.101.108) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.25; Wed, 19 Apr 2023 15:49:44 +0800 Received: from mtksdccf07.mediatek.inc (172.21.84.99) by mtkmbs13n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.1118.25 via Frontend Transport; Wed, 19 Apr 2023 15:49:44 +0800 From: To: Daniel Lezcano , Thomas Gleixner , Matthias Brugger , AngeloGioacchino Del Regno , "Maciej W . Rozycki" , John Stultz CC: , , , , , Chun-Hung Wu , , , Subject: [PATCH linux-next v3 3/4] clocksource/drivers/timer-of: Remove __init markings Date: Wed, 19 Apr 2023 15:49:07 +0800 Message-ID: <20230419074910.10809-4-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230419074910.10809-1-walter.chang@mediatek.com> References: <20230419074910.10809-1-walter.chang@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,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 From: Chun-Hung Wu Remove __init markings to allow timer drivers can be compiled as modules. Signed-off-by: Chun-Hung Wu --- drivers/clocksource/timer-of.c | 23 ++++++++++++----------- drivers/clocksource/timer-of.h | 6 +++--- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index c3f54d9912be..59bc5921acad 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -19,7 +19,7 @@ * * Free the irq resource */ -static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) +static void timer_of_irq_exit(struct of_timer_irq *of_irq) { struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); @@ -47,8 +47,8 @@ static __init void timer_of_irq_exit(struct of_timer_irq *of_irq) * * Returns 0 on success, < 0 otherwise */ -static __init int timer_of_irq_init(struct device_node *np, - struct of_timer_irq *of_irq) +static int timer_of_irq_init(struct device_node *np, + struct of_timer_irq *of_irq) { int ret; struct timer_of *to = container_of(of_irq, struct timer_of, of_irq); @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_node *np, * * Disables and releases the refcount on the clk */ -static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) +static void timer_of_clk_exit(struct of_timer_clk *of_clk) { of_clk->rate = 0; clk_disable_unprepare(of_clk->clk); @@ -107,8 +107,8 @@ static __init void timer_of_clk_exit(struct of_timer_clk *of_clk) * * Returns 0 on success, < 0 otherwise */ -static __init int timer_of_clk_init(struct device_node *np, - struct of_timer_clk *of_clk) +static int timer_of_clk_init(struct device_node *np, + struct of_timer_clk *of_clk) { int ret; @@ -146,13 +146,13 @@ static __init int timer_of_clk_init(struct device_node *np, goto out; } -static __init void timer_of_base_exit(struct of_timer_base *of_base) +static void timer_of_base_exit(struct of_timer_base *of_base) { iounmap(of_base->base); } -static __init int timer_of_base_init(struct device_node *np, - struct of_timer_base *of_base) +static int timer_of_base_init(struct device_node *np, + struct of_timer_base *of_base) { of_base->base = of_base->name ? of_io_request_and_map(np, of_base->index, of_base->name) : @@ -165,7 +165,7 @@ static __init int timer_of_base_init(struct device_node *np, return 0; } -int __init timer_of_init(struct device_node *np, struct timer_of *to) +int timer_of_init(struct device_node *np, struct timer_of *to) { int ret = -EINVAL; int flags = 0; @@ -209,6 +209,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) timer_of_base_exit(&to->of_base); return ret; } +EXPORT_SYMBOL_GPL(timer_of_init); /** * timer_of_cleanup - release timer_of resources @@ -217,7 +218,7 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) * Release the resources that has been used in timer_of_init(). * This function should be called in init error cases */ -void __init timer_of_cleanup(struct timer_of *to) +void timer_of_cleanup(struct timer_of *to) { if (to->flags & TIMER_OF_IRQ) timer_of_irq_exit(&to->of_irq); diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h index a5478f3e8589..5d1472846346 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h @@ -66,9 +66,9 @@ static inline unsigned long timer_of_period(struct timer_of *to) return to->of_clk.period; } -extern int __init timer_of_init(struct device_node *np, - struct timer_of *to); +extern int timer_of_init(struct device_node *np, + struct timer_of *to); -extern void __init timer_of_cleanup(struct timer_of *to); +extern void timer_of_cleanup(struct timer_of *to); #endif -- 2.18.0