mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
clk: sunxi-ng: v3s: Fix incorrect number of hw_clks.
[ Upstream commit 4ff40d140e ]
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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3ea87219a9
commit
f0a7b02147
@@ -618,7 +618,7 @@ static struct clk_hw_onecell_data sun8i_v3s_hw_clks = {
|
||||
[CLK_MBUS] = &mbus_clk.common.hw,
|
||||
[CLK_MIPI_CSI] = &mipi_csi_clk.common.hw,
|
||||
},
|
||||
.num = CLK_NUMBER,
|
||||
.num = CLK_PLL_DDR1 + 1,
|
||||
};
|
||||
|
||||
static struct clk_hw_onecell_data sun8i_v3_hw_clks = {
|
||||
@@ -700,7 +700,7 @@ static struct clk_hw_onecell_data sun8i_v3_hw_clks = {
|
||||
[CLK_MBUS] = &mbus_clk.common.hw,
|
||||
[CLK_MIPI_CSI] = &mipi_csi_clk.common.hw,
|
||||
},
|
||||
.num = CLK_NUMBER,
|
||||
.num = CLK_I2S0 + 1,
|
||||
};
|
||||
|
||||
static struct ccu_reset_map sun8i_v3s_ccu_resets[] = {
|
||||
|
||||
@@ -51,6 +51,4 @@
|
||||
|
||||
#define CLK_PLL_DDR1 74
|
||||
|
||||
#define CLK_NUMBER (CLK_I2S0 + 1)
|
||||
|
||||
#endif /* _CCU_SUN8I_H3_H_ */
|
||||
|
||||
Reference in New Issue
Block a user