diff mbox series

[v4,4/5] clk: clps711x: Terminate clk_div_table with sentinel element

Message ID 20220218000922.134857-5-j.neuschaefer@gmx.net (mailing list archive)
State New, archived
Headers show
Series clk drivers: Terminate clk_div_table with sentinel element | expand

Commit Message

Jonathan Neuschäfer Feb. 18, 2022, 12:09 a.m. UTC
In order that the end of a clk_div_table can be detected, it must be
terminated with a sentinel element (.div = 0).

Fixes: 631c53478973d ("clk: Add CLPS711X clk driver")
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
---

v4:
- Change style to { /* sentinel */ }

v3:
- no changes

v2:
- Add Fixes tag
---
 drivers/clk/clk-clps711x.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.34.1

Comments

Stephen Boyd March 12, 2022, 2:16 a.m. UTC | #1
Quoting Jonathan Neuschäfer (2022-02-17 16:09:20)
> In order that the end of a clk_div_table can be detected, it must be
> terminated with a sentinel element (.div = 0).
> 
> Fixes: 631c53478973d ("clk: Add CLPS711X clk driver")
> Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
> ---

Applied to clk-next
diff mbox series

Patch

diff --git a/drivers/clk/clk-clps711x.c b/drivers/clk/clk-clps711x.c
index a2c6486ef1708..f8417ee2961aa 100644
--- a/drivers/clk/clk-clps711x.c
+++ b/drivers/clk/clk-clps711x.c
@@ -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 {