summaryrefslogtreecommitdiff
path: root/drivers/net/wireless/iwlwifi/iwl-ucode.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2012-03-05 23:24:33 +0400
committerJohn W. Linville <linville@tuxdriver.com>2012-03-07 00:16:11 +0400
commit706c4ff67cb86134a3a93413a595a7c5559b7cc2 (patch)
tree5067706aa3826015a8be7e2137ffd8f9f9c290ab /drivers/net/wireless/iwlwifi/iwl-ucode.c
parent7e79a3937a44b1dc5f457e6dbb8c50e93719286a (diff)
downloadlinux-706c4ff67cb86134a3a93413a595a7c5559b7cc2.tar.xz
iwlwifi: make config const
Writing to the global config structures is always wrong. To protect against such mistakes in the future, mark them const. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-ucode.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-ucode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-ucode.c b/drivers/net/wireless/iwlwifi/iwl-ucode.c
index b16efc00ba6e..206a61c991dd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-ucode.c
+++ b/drivers/net/wireless/iwlwifi/iwl-ucode.c
@@ -692,7 +692,7 @@ static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context);
int __must_check iwl_request_firmware(struct iwl_nic *nic, bool first)
{
- struct iwl_cfg *cfg = cfg(nic);
+ const struct iwl_cfg *cfg = cfg(nic);
const char *name_pre = cfg->fw_name_pre;
char tag[8];
@@ -1045,7 +1045,7 @@ static int iwl_parse_tlv_firmware(struct iwl_nic *nic,
static void iwl_ucode_callback(const struct firmware *ucode_raw, void *context)
{
struct iwl_nic *nic = context;
- struct iwl_cfg *cfg = cfg(nic);
+ const struct iwl_cfg *cfg = cfg(nic);
struct iwl_fw *fw = &nic->fw;
struct iwl_ucode_header *ucode;
int err;