summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudiu Beznea <claudiu.beznea@microchip.com>2020-11-19 17:43:07 +0200
committerStephen Boyd <sboyd@kernel.org>2020-12-19 11:50:55 -0800
commit91274497c79170aaadc491d4ffe4de35495a060d (patch)
tree6bfdf9ac8cd9d4d6affad6d966574d218ebc0bdf
parent3650b228f83adda7e5ee532e2b90429c03f7b9ec (diff)
clk: at91: sama7g5: fix compilation error
pmc_data_allocate() has been changed. pmc_data_free() was removed. Adapt the code taking this into consideration. With this the programmable clocks were also saved in sama7g5_pmc so that they could be later referenced. Fixes: cb783bbbcf54 ("clk: at91: sama7g5: add clock support for sama7g5") Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com> Reviewed-by: Tudor Ambarus <tudor.ambarus@microchip.com> Tested-by: Tudor Ambarus <tudor.ambarus@microchip.com> Link: https://lore.kernel.org/r/1605800597-16720-2-git-send-email-claudiu.beznea@microchip.com Signed-off-by: Stephen Boyd <sboyd@kernel.org>
-rw-r--r--drivers/clk/at91/sama7g5.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/clk/at91/sama7g5.c b/drivers/clk/at91/sama7g5.c
index 0db2ab3eca14..a092a940baa4 100644
--- a/drivers/clk/at91/sama7g5.c
+++ b/drivers/clk/at91/sama7g5.c
@@ -838,7 +838,7 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
sama7g5_pmc = pmc_data_allocate(PMC_I2S1_MUX + 1,
nck(sama7g5_systemck),
nck(sama7g5_periphck),
- nck(sama7g5_gck));
+ nck(sama7g5_gck), 8);
if (!sama7g5_pmc)
return;
@@ -980,6 +980,8 @@ static void __init sama7g5_pmc_setup(struct device_node *np)
sama7g5_prog_mux_table);
if (IS_ERR(hw))
goto err_free;
+
+ sama7g5_pmc->pchws[i] = hw;
}
for (i = 0; i < ARRAY_SIZE(sama7g5_systemck); i++) {
@@ -1052,7 +1054,7 @@ err_free:
kfree(alloc_mem);
}
- pmc_data_free(sama7g5_pmc);
+ kfree(sama7g5_pmc);
}
/* Some clks are used for a clocksource */