ath10k: make ath10k_hw_ce_regs const
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 13 Sep 2017 19:01:52 +0000 (00:31 +0530)
committerKalle Valo <kvalo@qca.qualcomm.com>
Mon, 25 Sep 2017 07:15:45 +0000 (10:15 +0300)
Make them const as they are not modified in the file referencing
them. They are only stored in the const field 'hw_ce_reg' of an ath10k
structure. Also, make the declarations in the header const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/hw.c
drivers/net/wireless/ath/ath10k/hw.h

index a860691d635d5c78637bb4f9276f38e456ba3474..07df7c6bc05bbd2249765a1cf7f35419540d6dd3 100644 (file)
@@ -310,7 +310,7 @@ static struct ath10k_hw_ce_dst_src_wm_regs wcn3990_wm_dst_ring = {
        .wm_high        = &wcn3990_dst_wm_high,
 };
 
-struct ath10k_hw_ce_regs wcn3990_ce_regs = {
+const struct ath10k_hw_ce_regs wcn3990_ce_regs = {
        .sr_base_addr           = 0x00000000,
        .sr_size_addr           = 0x00000008,
        .dr_base_addr           = 0x0000000c,
@@ -457,7 +457,7 @@ static struct ath10k_hw_ce_dst_src_wm_regs qcax_wm_dst_ring = {
        .wm_high        = &qcax_dst_wm_high,
 };
 
-struct ath10k_hw_ce_regs qcax_ce_regs = {
+const struct ath10k_hw_ce_regs qcax_ce_regs = {
        .sr_base_addr           = 0x00000000,
        .sr_size_addr           = 0x00000004,
        .dr_base_addr           = 0x00000008,
index 0c089f6dd3d92f9c44a114990c118efba9f5f7be..f80840fae51716dbf1a7b86ca7bceb7726dcb024 100644 (file)
@@ -369,8 +369,8 @@ extern const struct ath10k_hw_values qca99x0_values;
 extern const struct ath10k_hw_values qca9888_values;
 extern const struct ath10k_hw_values qca4019_values;
 extern const struct ath10k_hw_values wcn3990_values;
-extern struct ath10k_hw_ce_regs wcn3990_ce_regs;
-extern struct ath10k_hw_ce_regs qcax_ce_regs;
+extern const struct ath10k_hw_ce_regs wcn3990_ce_regs;
+extern const struct ath10k_hw_ce_regs qcax_ce_regs;
 
 void ath10k_hw_fill_survey_time(struct ath10k *ar, struct survey_info *survey,
                                u32 cc, u32 rcc, u32 cc_prev, u32 rcc_prev);