Skip to content

Commit 87df31e

Browse files
krzkandersson
authored andcommitted
clk: qcom: Constify list of critical CBCR registers
The static array 'xxx_critical_cbcrs' contains probe match-like data and is not modified: neither by the driver defining it nor by common.c code using it. Make it const for code safety and code readability. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Link: https://lore.kernel.org/r/20260331091721.61613-4-krzysztof.kozlowski@oss.qualcomm.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 573ddd0 commit 87df31e

32 files changed

Lines changed: 33 additions & 33 deletions

drivers/clk/qcom/cambistmclkcc-kaanapali.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ static struct clk_alpha_pll *cam_bist_mclk_cc_kaanapali_plls[] = {
383383
&cam_bist_mclk_cc_pll0,
384384
};
385385

386-
static u32 cam_bist_mclk_cc_kaanapali_critical_cbcrs[] = {
386+
static const u32 cam_bist_mclk_cc_kaanapali_critical_cbcrs[] = {
387387
0x40e0, /* CAM_BIST_MCLK_CC_SLEEP_CLK */
388388
};
389389

drivers/clk/qcom/cambistmclkcc-sm8750.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static struct clk_alpha_pll *cam_bist_mclk_cc_sm8750_plls[] = {
402402
&cam_bist_mclk_cc_pll0,
403403
};
404404

405-
static u32 cam_bist_mclk_cc_sm8750_critical_cbcrs[] = {
405+
static const u32 cam_bist_mclk_cc_sm8750_critical_cbcrs[] = {
406406
0x40f8, /* CAM_BIST_MCLK_CC_SLEEP_CLK */
407407
};
408408

drivers/clk/qcom/camcc-kaanapali.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2600,7 +2600,7 @@ static struct clk_alpha_pll *cam_cc_kaanapali_plls[] = {
26002600
&cam_cc_pll7,
26012601
};
26022602

2603-
static u32 cam_cc_kaanapali_critical_cbcrs[] = {
2603+
static const u32 cam_cc_kaanapali_critical_cbcrs[] = {
26042604
0x21398, /* CAM_CC_DRV_AHB_CLK */
26052605
0x21390, /* CAM_CC_DRV_XO_CLK */
26062606
0x21364, /* CAM_CC_GDSC_CLK */

drivers/clk/qcom/camcc-milos.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2104,7 +2104,7 @@ static struct clk_alpha_pll *cam_cc_milos_plls[] = {
21042104
&cam_cc_pll6,
21052105
};
21062106

2107-
static u32 cam_cc_milos_critical_cbcrs[] = {
2107+
static const u32 cam_cc_milos_critical_cbcrs[] = {
21082108
0x25038, /* CAM_CC_GDSC_CLK */
21092109
0x2505c, /* CAM_CC_SLEEP_CLK */
21102110
};

drivers/clk/qcom/camcc-sc8180x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2829,7 +2829,7 @@ static struct clk_alpha_pll *cam_cc_sc8180x_plls[] = {
28292829
&cam_cc_pll6,
28302830
};
28312831

2832-
static u32 cam_cc_sc8180x_critical_cbcrs[] = {
2832+
static const u32 cam_cc_sc8180x_critical_cbcrs[] = {
28332833
0xc1e4, /* CAM_CC_GDSC_CLK */
28342834
0xc200, /* CAM_CC_SLEEP_CLK */
28352835
};

drivers/clk/qcom/camcc-sm8450.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2915,7 +2915,7 @@ static struct clk_alpha_pll *cam_cc_sm8450_plls[] = {
29152915
&cam_cc_pll8,
29162916
};
29172917

2918-
static u32 cam_cc_sm8450_critical_cbcrs[] = {
2918+
static const u32 cam_cc_sm8450_critical_cbcrs[] = {
29192919
0x1320c, /* CAM_CC_GDSC_CLK */
29202920
};
29212921

drivers/clk/qcom/camcc-sm8550.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3517,7 +3517,7 @@ static struct clk_alpha_pll *cam_cc_sm8550_plls[] = {
35173517
&cam_cc_pll12,
35183518
};
35193519

3520-
static u32 cam_cc_sm8550_critical_cbcrs[] = {
3520+
static const u32 cam_cc_sm8550_critical_cbcrs[] = {
35213521
0x1419c, /* CAM_CC_GDSC_CLK */
35223522
0x142cc, /* CAM_CC_SLEEP_CLK */
35233523
};

drivers/clk/qcom/camcc-sm8650.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3533,7 +3533,7 @@ static struct clk_alpha_pll *cam_cc_sm8650_plls[] = {
35333533
&cam_cc_pll10,
35343534
};
35353535

3536-
static u32 cam_cc_sm8650_critical_cbcrs[] = {
3536+
static const u32 cam_cc_sm8650_critical_cbcrs[] = {
35373537
0x132ec, /* CAM_CC_GDSC_CLK */
35383538
0x13308, /* CAM_CC_SLEEP_CLK */
35393539
0x13314, /* CAM_CC_DRV_XO_CLK */

drivers/clk/qcom/camcc-sm8750.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2651,7 +2651,7 @@ static struct clk_alpha_pll *cam_cc_sm8750_plls[] = {
26512651
&cam_cc_pll6,
26522652
};
26532653

2654-
static u32 cam_cc_sm8750_critical_cbcrs[] = {
2654+
static const u32 cam_cc_sm8750_critical_cbcrs[] = {
26552655
0x113c4, /* CAM_CC_DRV_AHB_CLK */
26562656
0x113c0, /* CAM_CC_DRV_XO_CLK */
26572657
0x1137c, /* CAM_CC_GDSC_CLK */

drivers/clk/qcom/camcc-x1e80100.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2434,7 +2434,7 @@ static struct clk_alpha_pll *cam_cc_x1e80100_plls[] = {
24342434
&cam_cc_pll8,
24352435
};
24362436

2437-
static u32 cam_cc_x1e80100_critical_cbcrs[] = {
2437+
static const u32 cam_cc_x1e80100_critical_cbcrs[] = {
24382438
0x13a9c, /* CAM_CC_GDSC_CLK */
24392439
0x13ab8, /* CAM_CC_SLEEP_CLK */
24402440
};

0 commit comments

Comments
 (0)