Skip to content

Commit 57746e9

Browse files
bijudasgeertu
authored andcommitted
clk: renesas: r9a07g044: Add conditional compilation for r9a07g044_cpg_info
Add conditional compilation for struct r9a07g044_cpg_info, so the compiler won't allocate any memory for this variable in case CONFIG_CLK_R9A07G044 is disabled. Reported-by: Pavel Machek <pavel@denx.de> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Link: https://lore.kernel.org/r/20220804082605.157269-1-biju.das.jz@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 1e56ebc commit 57746e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/clk/renesas/r9a07g044-cpg.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,7 @@ static const unsigned int r9a07g044_crit_mod_clks[] __initconst = {
414414
MOD_CLK_BASE + R9A07G044_DMAC_ACLK,
415415
};
416416

417+
#ifdef CONFIG_CLK_R9A07G044
417418
const struct rzg2l_cpg_info r9a07g044_cpg_info = {
418419
/* Core Clocks */
419420
.core_clks = core_clks.common,
@@ -436,6 +437,7 @@ const struct rzg2l_cpg_info r9a07g044_cpg_info = {
436437

437438
.has_clk_mon_regs = true,
438439
};
440+
#endif
439441

440442
#ifdef CONFIG_CLK_R9A07G054
441443
const struct rzg2l_cpg_info r9a07g054_cpg_info = {

0 commit comments

Comments
 (0)