clk: mark clk_disable_unused() as __init
clk_disable_unused is only called once, as a late_initcall, so reclaim a bit of memory by marking it (and the functions and data it is the sole user of) as __init/__initdata. This moves ~1900 bytes from .text to .init.text for a imx_v6_v7_defconfig. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Link: https://lkml.kernel.org/r/20191004094826.8320-1-linux@rasmusvillemoes.dk Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
This commit is contained in:
parent
8247470772
commit
564f86d384
|
@ -1187,7 +1187,7 @@ static void clk_core_disable_unprepare(struct clk_core *core)
|
||||||
clk_core_unprepare_lock(core);
|
clk_core_unprepare_lock(core);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clk_unprepare_unused_subtree(struct clk_core *core)
|
static void __init clk_unprepare_unused_subtree(struct clk_core *core)
|
||||||
{
|
{
|
||||||
struct clk_core *child;
|
struct clk_core *child;
|
||||||
|
|
||||||
|
@ -1217,7 +1217,7 @@ static void clk_unprepare_unused_subtree(struct clk_core *core)
|
||||||
clk_pm_runtime_put(core);
|
clk_pm_runtime_put(core);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clk_disable_unused_subtree(struct clk_core *core)
|
static void __init clk_disable_unused_subtree(struct clk_core *core)
|
||||||
{
|
{
|
||||||
struct clk_core *child;
|
struct clk_core *child;
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
@ -1263,7 +1263,7 @@ unprepare_out:
|
||||||
clk_core_disable_unprepare(core->parent);
|
clk_core_disable_unprepare(core->parent);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool clk_ignore_unused;
|
static bool clk_ignore_unused __initdata;
|
||||||
static int __init clk_ignore_unused_setup(char *__unused)
|
static int __init clk_ignore_unused_setup(char *__unused)
|
||||||
{
|
{
|
||||||
clk_ignore_unused = true;
|
clk_ignore_unused = true;
|
||||||
|
@ -1271,7 +1271,7 @@ static int __init clk_ignore_unused_setup(char *__unused)
|
||||||
}
|
}
|
||||||
__setup("clk_ignore_unused", clk_ignore_unused_setup);
|
__setup("clk_ignore_unused", clk_ignore_unused_setup);
|
||||||
|
|
||||||
static int clk_disable_unused(void)
|
static int __init clk_disable_unused(void)
|
||||||
{
|
{
|
||||||
struct clk_core *core;
|
struct clk_core *core;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue