Commit 7340264e authored by Marijn Suijten's avatar Marijn Suijten Committed by Stephen Boyd

clk: qcom: gpucc-sdm660: Use ARRAY_SIZE for num_parents

Where possible, use ARRAY_SIZE to determine the number of parents in
clk_parent_data, instead of hardcoding it.
Signed-off-by: default avatarMarijn Suijten <marijn.suijten@somainline.org>
Link: https://lore.kernel.org/r/20210829204822.289829-3-marijn.suijten@somainline.orgSigned-off-by: default avatarStephen Boyd <sboyd@kernel.org>
parent 00ff8188
...@@ -114,7 +114,7 @@ static struct clk_rcg2_gfx3d gfx3d_clk_src = { ...@@ -114,7 +114,7 @@ static struct clk_rcg2_gfx3d gfx3d_clk_src = {
.clkr.hw.init = &(struct clk_init_data){ .clkr.hw.init = &(struct clk_init_data){
.name = "gfx3d_clk_src", .name = "gfx3d_clk_src",
.parent_data = gpucc_parent_data_1, .parent_data = gpucc_parent_data_1,
.num_parents = 4, .num_parents = ARRAY_SIZE(gpucc_parent_data_1),
.ops = &clk_gfx3d_ops, .ops = &clk_gfx3d_ops,
.flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE, .flags = CLK_SET_RATE_PARENT | CLK_OPS_PARENT_ENABLE,
}, },
...@@ -172,7 +172,7 @@ static struct clk_rcg2 rbbmtimer_clk_src = { ...@@ -172,7 +172,7 @@ static struct clk_rcg2 rbbmtimer_clk_src = {
.clkr.hw.init = &(struct clk_init_data){ .clkr.hw.init = &(struct clk_init_data){
.name = "rbbmtimer_clk_src", .name = "rbbmtimer_clk_src",
.parent_data = gpucc_parent_data_0, .parent_data = gpucc_parent_data_0,
.num_parents = 3, .num_parents = ARRAY_SIZE(gpucc_parent_data_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_ops,
}, },
}; };
...@@ -192,7 +192,7 @@ static struct clk_rcg2 rbcpr_clk_src = { ...@@ -192,7 +192,7 @@ static struct clk_rcg2 rbcpr_clk_src = {
.clkr.hw.init = &(struct clk_init_data){ .clkr.hw.init = &(struct clk_init_data){
.name = "rbcpr_clk_src", .name = "rbcpr_clk_src",
.parent_data = gpucc_parent_data_0, .parent_data = gpucc_parent_data_0,
.num_parents = 3, .num_parents = ARRAY_SIZE(gpucc_parent_data_0),
.ops = &clk_rcg2_ops, .ops = &clk_rcg2_ops,
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment