Skip to content

Commit

Permalink
clk: clps711x: Terminate clk_div_table with sentinel element
Browse files Browse the repository at this point in the history
In order that the end of a clk_div_table can be detected, it must be
terminated with a sentinel element (.div = 0).

Fixes: 631c534 ("clk: Add CLPS711X clk driver")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Link: https://lore.kernel.org/r/20220218000922.134857-5-j.neuschaefer@gmx.net
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Jonathan Neuschäfer authored and Stephen Boyd committed Mar 12, 2022
1 parent 113b261 commit 8bed4ed
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/clk/clk-clps711x.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,13 @@ static const struct clk_div_table spi_div_table[] = {
{ .val = 1, .div = 8, },
{ .val = 2, .div = 2, },
{ .val = 3, .div = 1, },
{ /* sentinel */ }
};

static const struct clk_div_table timer_div_table[] = {
{ .val = 0, .div = 256, },
{ .val = 1, .div = 1, },
{ /* sentinel */ }
};

struct clps711x_clk {
Expand Down

0 comments on commit 8bed4ed

Please sign in to comment.