From nobody Sat Sep 21 00:05:28 2024 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 E5B10C77B75 for ; Fri, 21 Apr 2023 03:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233876AbjDUDsP (ORCPT ); Thu, 20 Apr 2023 23:48:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45638 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233728AbjDUDsC (ORCPT ); Thu, 20 Apr 2023 23:48:02 -0400 Received: from mailgw01.mediatek.com (unknown [60.244.123.138]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 445BC44A2 for ; Thu, 20 Apr 2023 20:47:56 -0700 (PDT) X-UUID: 4a5b49ccdff711eda9a90f0bb45854f4-20230421 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=a2JTOoiO226LwJkA7GXNw21hhLZxL7jH1FIFqJzn3pSmv1uRxoOQ2En2ZwHapXMxblFUsQHJUd4K3shZ0HE9Yu/t8Gu5SmTg/COD6N7yvIre5i9cEbxDoITjjwCCpfxT4MEFbwv6csYP/nBJbmKMaPrv0wZsC+Xr8FYz5C2eBog=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.22,REQID:63013d2b-dd33-4bc2-94c2-dcd3e29f7208,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:df2fadeb-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: 4a5b49ccdff711eda9a90f0bb45854f4-20230421 Received: from mtkmbs11n2.mediatek.inc [(172.21.101.187)] by mailgw01.mediatek.com (envelope-from ) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 52984891; Fri, 21 Apr 2023 11:47:51 +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; Fri, 21 Apr 2023 11:47:50 +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; Fri, 21 Apr 2023 11:47:50 +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 v4 3/4] clocksource/drivers/timer-of: Remove __init markings Date: Fri, 21 Apr 2023 11:46:48 +0800 Message-ID: <20230421034649.15247-4-walter.chang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20230421034649.15247-1-walter.chang@mediatek.com> References: <20230421034649.15247-1-walter.chang@mediatek.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 =3D container_of(of_irq, struct timer_of, of_irq); =20 @@ -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 =3D container_of(of_irq, struct timer_of, of_irq); @@ -91,7 +91,7 @@ static __init int timer_of_irq_init(struct device_node *n= p, * * 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 =3D 0; clk_disable_unprepare(of_clk->clk); @@ -107,8 +107,8 @@ static __init void timer_of_clk_exit(struct of_timer_cl= k *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; =20 @@ -146,13 +146,13 @@ static __init int timer_of_clk_init(struct device_nod= e *np, goto out; } =20 -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); } =20 -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 =3D 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; } =20 -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 =3D -EINVAL; int flags =3D 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); =20 /** * 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; } =20 -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); =20 -extern void __init timer_of_cleanup(struct timer_of *to); +extern void timer_of_cleanup(struct timer_of *to); =20 #endif --=20 2.18.0