ath10k: remove enum ath10k_swap_code_seg_bin_type
authorKalle Valo <kvalo@qca.qualcomm.com>
Wed, 20 Apr 2016 16:46:16 +0000 (19:46 +0300)
committerKalle Valo <kvalo@qca.qualcomm.com>
Wed, 20 Apr 2016 17:00:30 +0000 (20:00 +0300)
It's not needed for anything so just get rid of it.

Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
drivers/net/wireless/ath/ath10k/core.c
drivers/net/wireless/ath/ath10k/swap.c
drivers/net/wireless/ath/ath10k/swap.h

index db9437a72ba42b54850e3b0a270a900b4dae2f50..e94cb87380d280c246b517fff9f2f8b28b75bcd2 100644 (file)
@@ -647,8 +647,7 @@ static int ath10k_download_fw(struct ath10k *ar)
        data = ar->running_fw->fw_file.firmware_data;
        data_len = ar->running_fw->fw_file.firmware_len;
 
-       ret = ath10k_swap_code_seg_configure(ar,
-                                            ATH10K_SWAP_CODE_SEG_BIN_TYPE_FW);
+       ret = ath10k_swap_code_seg_configure(ar);
        if (ret) {
                ath10k_err(ar, "failed to configure fw code swap: %d\n",
                           ret);
index 47d449bac86db7519ac364bb8321be9ea9eeabf8..0c5f5863dac878b38ba5467b75762bf59e6b9d72 100644 (file)
@@ -134,27 +134,17 @@ ath10k_swap_code_seg_alloc(struct ath10k *ar, size_t swap_bin_len)
        return seg_info;
 }
 
-int ath10k_swap_code_seg_configure(struct ath10k *ar,
-                                  enum ath10k_swap_code_seg_bin_type type)
+int ath10k_swap_code_seg_configure(struct ath10k *ar)
 {
        int ret;
        struct ath10k_swap_code_seg_info *seg_info = NULL;
 
-       switch (type) {
-       case ATH10K_SWAP_CODE_SEG_BIN_TYPE_FW:
-               if (!ar->swap.firmware_swap_code_seg_info)
-                       return 0;
-
-               ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot found firmware code swap binary\n");
-               seg_info = ar->swap.firmware_swap_code_seg_info;
-               break;
-       default:
-       case ATH10K_SWAP_CODE_SEG_BIN_TYPE_OTP:
-       case ATH10K_SWAP_CODE_SEG_BIN_TYPE_UTF:
-               ath10k_warn(ar, "ignoring unknown code swap binary type %d\n",
-                           type);
+       if (!ar->swap.firmware_swap_code_seg_info)
                return 0;
-       }
+
+       ath10k_dbg(ar, ATH10K_DBG_BOOT, "boot found firmware code swap binary\n");
+
+       seg_info = ar->swap.firmware_swap_code_seg_info;
 
        ret = ath10k_bmi_write_memory(ar, seg_info->target_addr,
                                      &seg_info->seg_hw_info,
index 5c89952dd20f196e57e7a8008c1c5bf8b0b11a15..36991c7b07a04f08339ce9eaa19e4a8ca8940fc1 100644 (file)
@@ -39,12 +39,6 @@ union ath10k_swap_code_seg_item {
        struct ath10k_swap_code_seg_tail tail;
 } __packed;
 
-enum ath10k_swap_code_seg_bin_type {
-        ATH10K_SWAP_CODE_SEG_BIN_TYPE_OTP,
-        ATH10K_SWAP_CODE_SEG_BIN_TYPE_FW,
-        ATH10K_SWAP_CODE_SEG_BIN_TYPE_UTF,
-};
-
 struct ath10k_swap_code_seg_hw_info {
        /* Swap binary image size */
        __le32 swap_size;
@@ -64,8 +58,7 @@ struct ath10k_swap_code_seg_info {
        dma_addr_t paddr[ATH10K_SWAP_CODE_SEG_NUM_SUPPORTED];
 };
 
-int ath10k_swap_code_seg_configure(struct ath10k *ar,
-                                  enum ath10k_swap_code_seg_bin_type type);
+int ath10k_swap_code_seg_configure(struct ath10k *ar);
 void ath10k_swap_code_seg_release(struct ath10k *ar);
 int ath10k_swap_code_seg_init(struct ath10k *ar);