FROMLIST: drivers/clocksource/timer-of: Remove __init markings

This allows timer drivers to be compiled as modules.

Bug: 146868249
Change-Id: I490a0e82ff59022da72b5e2f7e631cfb21533589
Link: https://lore.kernel.org/patchwork/patch/1214447/
Signed-off-by: Saravana Kannan <saravanak@google.com>
Signed-off-by: Baolin Wang <baolin.wang7@gmail.com>
Signed-off-by: Baolin Wang <baolin.wang@unisoc.corp-partner.google.com>
Signed-off-by: Orson Zhai <orson.zhai@unisoc.com>
This commit is contained in:
Saravana Kannan 2020-03-24 10:45:24 +08:00 committed by Todd Kjos
parent d9dc672866
commit 86f92cfc9d
2 changed files with 11 additions and 10 deletions

View File

@ -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,7 +47,7 @@ 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,
static int timer_of_irq_init(struct device_node *np,
struct of_timer_irq *of_irq)
{
int ret;
@ -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,7 +107,7 @@ 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,
static int timer_of_clk_init(struct device_node *np,
struct of_timer_clk *of_clk)
{
int ret;
@ -146,12 +146,12 @@ out_clk_put:
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,
static int timer_of_base_init(struct device_node *np,
struct of_timer_base *of_base)
{
of_base->base = 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 @@ out_fail:
timer_of_base_exit(&to->of_base);
return ret;
}
EXPORT_SYMBOL_GPL(timer_of_init);
/**
* timer_of_cleanup - release timer_of ressources
@ -217,7 +218,7 @@ out_fail:
* Release the ressources 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);

View File

@ -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,
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