]> git.baikalelectronics.ru Git - kernel.git/commit
clk: sunxi-ng: v3s: Fix incorrect number of hw_clks.
authorYunhao Tian <18373444@buaa.edu.cn>
Mon, 25 Nov 2019 12:58:32 +0000 (20:58 +0800)
committerMaxime Ripard <maxime@cerno.tech>
Mon, 9 Dec 2019 07:49:31 +0000 (08:49 +0100)
commitfbaef278dff753915f29798c0fc3e7d50a842374
treebbcc4dd63d19a64b5fe08042eaf757635ccf32e7
parent47599c6298943ede4662b5e31dfe375feac1b48a
clk: sunxi-ng: v3s: Fix incorrect number of hw_clks.

The hws field of sun8i_v3s_hw_clks has only 74
members. However, the number specified by CLK_NUMBER
is 77 (= CLK_I2S0 + 1). This leads to runtime segmentation
fault that is not always reproducible.

This patch fixes the problem by specifying correct clock number.

Signed-off-by: Yunhao Tian <18373444@buaa.edu.cn>
[Maxime: Also remove the CLK_NUMBER definition]
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/clk/sunxi-ng/ccu-sun8i-v3s.c
drivers/clk/sunxi-ng/ccu-sun8i-v3s.h