diff options
Diffstat (limited to 'drivers/net/wireless/iwlegacy/common.c')
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 3900967a79f6..6dbd11f76f84 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -81,7 +81,7 @@ il_clear_bit(struct il_priv *p, u32 r, u32 m) | |||
81 | } | 81 | } |
82 | EXPORT_SYMBOL(il_clear_bit); | 82 | EXPORT_SYMBOL(il_clear_bit); |
83 | 83 | ||
84 | int | 84 | bool |
85 | _il_grab_nic_access(struct il_priv *il) | 85 | _il_grab_nic_access(struct il_priv *il) |
86 | { | 86 | { |
87 | int ret; | 87 | int ret; |
@@ -116,10 +116,10 @@ _il_grab_nic_access(struct il_priv *il) | |||
116 | WARN_ONCE(1, "Timeout waiting for ucode processor access " | 116 | WARN_ONCE(1, "Timeout waiting for ucode processor access " |
117 | "(CSR_GP_CNTRL 0x%08x)\n", val); | 117 | "(CSR_GP_CNTRL 0x%08x)\n", val); |
118 | _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI); | 118 | _il_wr(il, CSR_RESET, CSR_RESET_REG_FLAG_FORCE_NMI); |
119 | return -EIO; | 119 | return false; |
120 | } | 120 | } |
121 | 121 | ||
122 | return 0; | 122 | return true; |
123 | } | 123 | } |
124 | EXPORT_SYMBOL_GPL(_il_grab_nic_access); | 124 | EXPORT_SYMBOL_GPL(_il_grab_nic_access); |
125 | 125 | ||
@@ -161,7 +161,7 @@ il_wr_prph(struct il_priv *il, u32 addr, u32 val) | |||
161 | unsigned long reg_flags; | 161 | unsigned long reg_flags; |
162 | 162 | ||
163 | spin_lock_irqsave(&il->reg_lock, reg_flags); | 163 | spin_lock_irqsave(&il->reg_lock, reg_flags); |
164 | if (!_il_grab_nic_access(il)) { | 164 | if (likely(_il_grab_nic_access(il))) { |
165 | _il_wr_prph(il, addr, val); | 165 | _il_wr_prph(il, addr, val); |
166 | _il_release_nic_access(il); | 166 | _il_release_nic_access(il); |
167 | } | 167 | } |
@@ -194,7 +194,7 @@ il_write_targ_mem(struct il_priv *il, u32 addr, u32 val) | |||
194 | unsigned long reg_flags; | 194 | unsigned long reg_flags; |
195 | 195 | ||
196 | spin_lock_irqsave(&il->reg_lock, reg_flags); | 196 | spin_lock_irqsave(&il->reg_lock, reg_flags); |
197 | if (!_il_grab_nic_access(il)) { | 197 | if (likely(_il_grab_nic_access(il))) { |
198 | _il_wr(il, HBUS_TARG_MEM_WADDR, addr); | 198 | _il_wr(il, HBUS_TARG_MEM_WADDR, addr); |
199 | wmb(); | 199 | wmb(); |
200 | _il_wr(il, HBUS_TARG_MEM_WDAT, val); | 200 | _il_wr(il, HBUS_TARG_MEM_WDAT, val); |