]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
clk: loongson1: Terminate clk_div_table with sentinel element
authorJonathan Neuschäfer <j.neuschaefer@gmx.net>
Fri, 18 Feb 2022 00:09:18 +0000 (01:09 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 27 Apr 2022 09:58:08 +0000 (11:58 +0200)
BugLink: https://bugs.launchpad.net/bugs/1969110
[ Upstream commit 3eb00f89162e80083dfcaa842468b510462cfeaa ]

In order that the end of a clk_div_table can be detected, it must be
terminated with a sentinel element (.div = 0).

Fixes: b4626a7f4892 ("CLK: Add Loongson1C clock support")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Link: https://lore.kernel.org/r/20220218000922.134857-3-j.neuschaefer@gmx.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
(cherry picked from commit f4aee7714a1cc6776eb8f4608d9e88536efc4863)
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
drivers/clk/loongson1/clk-loongson1c.c

index 703f87622cf5f7042c216a27b5842ec83e146a99..1ebf740380efbd38f6a912e59e3488c4fc76a2e9 100644 (file)
@@ -37,6 +37,7 @@ static const struct clk_div_table ahb_div_table[] = {
        [1] = { .val = 1, .div = 4 },
        [2] = { .val = 2, .div = 3 },
        [3] = { .val = 3, .div = 3 },
+       [4] = { /* sentinel */ }
 };
 
 void __init ls1x_clk_init(void)