Skip to content

Commit 564f86d

Browse files
Villemoesbebarino
authored andcommitted
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 <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Reviewed-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 8247470 commit 564f86d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/clk.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static void clk_core_disable_unprepare(struct clk_core *core)
11871187
clk_core_unprepare_lock(core);
11881188
}
11891189

1190-
static void clk_unprepare_unused_subtree(struct clk_core *core)
1190+
static void __init clk_unprepare_unused_subtree(struct clk_core *core)
11911191
{
11921192
struct clk_core *child;
11931193

@@ -1217,7 +1217,7 @@ static void clk_unprepare_unused_subtree(struct clk_core *core)
12171217
clk_pm_runtime_put(core);
12181218
}
12191219

1220-
static void clk_disable_unused_subtree(struct clk_core *core)
1220+
static void __init clk_disable_unused_subtree(struct clk_core *core)
12211221
{
12221222
struct clk_core *child;
12231223
unsigned long flags;
@@ -1263,15 +1263,15 @@ static void clk_disable_unused_subtree(struct clk_core *core)
12631263
clk_core_disable_unprepare(core->parent);
12641264
}
12651265

1266-
static bool clk_ignore_unused;
1266+
static bool clk_ignore_unused __initdata;
12671267
static int __init clk_ignore_unused_setup(char *__unused)
12681268
{
12691269
clk_ignore_unused = true;
12701270
return 1;
12711271
}
12721272
__setup("clk_ignore_unused", clk_ignore_unused_setup);
12731273

1274-
static int clk_disable_unused(void)
1274+
static int __init clk_disable_unused(void)
12751275
{
12761276
struct clk_core *core;
12771277

0 commit comments

Comments
 (0)