aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-05-13 10:05:27 -0400
committerJohannes Berg <johannes.berg@intel.com>2013-05-16 17:13:17 -0400
commitbf0fd5da8afdea8e1b1a2b42b8e9db068fbac96b (patch)
tree140f4b497836bb20aa5b44948a3f854597a72127
parentee1e84225f779386858702872fb299457e7941f9 (diff)
iwlwifi: constify the source buffer of iwl_trans_write_mem
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-trans.h4
-rw-r--r--drivers/net/wireless/iwlwifi/pcie/trans.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-trans.h b/drivers/net/wireless/iwlwifi/iwl-trans.h
index 7a13790b5bfe..0470334d6a81 100644
--- a/drivers/net/wireless/iwlwifi/iwl-trans.h
+++ b/drivers/net/wireless/iwlwifi/iwl-trans.h
@@ -455,7 +455,7 @@ struct iwl_trans_ops {
455 int (*read_mem)(struct iwl_trans *trans, u32 addr, 455 int (*read_mem)(struct iwl_trans *trans, u32 addr,
456 void *buf, int dwords); 456 void *buf, int dwords);
457 int (*write_mem)(struct iwl_trans *trans, u32 addr, 457 int (*write_mem)(struct iwl_trans *trans, u32 addr,
458 void *buf, int dwords); 458 const void *buf, int dwords);
459 void (*configure)(struct iwl_trans *trans, 459 void (*configure)(struct iwl_trans *trans,
460 const struct iwl_trans_config *trans_cfg); 460 const struct iwl_trans_config *trans_cfg);
461 void (*set_pmi)(struct iwl_trans *trans, bool state); 461 void (*set_pmi)(struct iwl_trans *trans, bool state);
@@ -761,7 +761,7 @@ static inline u32 iwl_trans_read_mem32(struct iwl_trans *trans, u32 addr)
761} 761}
762 762
763static inline int iwl_trans_write_mem(struct iwl_trans *trans, u32 addr, 763static inline int iwl_trans_write_mem(struct iwl_trans *trans, u32 addr,
764 void *buf, int dwords) 764 const void *buf, int dwords)
765{ 765{
766 return trans->ops->write_mem(trans, addr, buf, dwords); 766 return trans->ops->write_mem(trans, addr, buf, dwords);
767} 767}
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c
index e5365196e5fe..a785f49df9b1 100644
--- a/drivers/net/wireless/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/iwlwifi/pcie/trans.c
@@ -924,11 +924,11 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr,
924} 924}
925 925
926static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr, 926static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr,
927 void *buf, int dwords) 927 const void *buf, int dwords)
928{ 928{
929 unsigned long flags; 929 unsigned long flags;
930 int offs, ret = 0; 930 int offs, ret = 0;
931 u32 *vals = buf; 931 const u32 *vals = buf;
932 932
933 if (iwl_trans_grab_nic_access(trans, false, &flags)) { 933 if (iwl_trans_grab_nic_access(trans, false, &flags)) {
934 iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr); 934 iwl_write32(trans, HBUS_TARG_MEM_WADDR, addr);