aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/b43/debugfs.c
diff options
context:
space:
mode:
authorMichael Buesch <mb@bu3sch.de>2009-09-04 16:57:26 -0400
committerJohn W. Linville <linville@tuxdriver.com>2009-09-08 16:31:08 -0400
commit69eddc8a37a33479205ac3a3d8575fad1466da90 (patch)
tree6e8f903b3d04d3a9ce85ab10e8f5a767224039c9 /drivers/net/wireless/b43/debugfs.c
parent77ca07ffe1797a0f2f41aa4997c9a5ae433a0be8 (diff)
b43: remove SHM spinlock
This removes the SHM spinlock. SHM is protected by wl->mutex. Signed-off-by: Michael Buesch <mb@bu3sch.de> Tested-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/debugfs.c')
-rw-r--r--drivers/net/wireless/b43/debugfs.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/b43/debugfs.c b/drivers/net/wireless/b43/debugfs.c
index bf23a3a863fa..8f64943e3f60 100644
--- a/drivers/net/wireless/b43/debugfs.c
+++ b/drivers/net/wireless/b43/debugfs.c
@@ -125,7 +125,6 @@ static int shm16write__write_file(struct b43_wldev *dev,
125 unsigned int routing, addr, mask, set; 125 unsigned int routing, addr, mask, set;
126 u16 val; 126 u16 val;
127 int res; 127 int res;
128 unsigned long flags;
129 128
130 res = sscanf(buf, "0x%X 0x%X 0x%X 0x%X", 129 res = sscanf(buf, "0x%X 0x%X 0x%X 0x%X",
131 &routing, &addr, &mask, &set); 130 &routing, &addr, &mask, &set);
@@ -142,15 +141,13 @@ static int shm16write__write_file(struct b43_wldev *dev,
142 if ((mask > 0xFFFF) || (set > 0xFFFF)) 141 if ((mask > 0xFFFF) || (set > 0xFFFF))
143 return -E2BIG; 142 return -E2BIG;
144 143
145 spin_lock_irqsave(&dev->wl->shm_lock, flags);
146 if (mask == 0) 144 if (mask == 0)
147 val = 0; 145 val = 0;
148 else 146 else
149 val = __b43_shm_read16(dev, routing, addr); 147 val = b43_shm_read16(dev, routing, addr);
150 val &= mask; 148 val &= mask;
151 val |= set; 149 val |= set;
152 __b43_shm_write16(dev, routing, addr, val); 150 b43_shm_write16(dev, routing, addr, val);
153 spin_unlock_irqrestore(&dev->wl->shm_lock, flags);
154 151
155 return 0; 152 return 0;
156} 153}
@@ -204,7 +201,6 @@ static int shm32write__write_file(struct b43_wldev *dev,
204 unsigned int routing, addr, mask, set; 201 unsigned int routing, addr, mask, set;
205 u32 val; 202 u32 val;
206 int res; 203 int res;
207 unsigned long flags;
208 204
209 res = sscanf(buf, "0x%X 0x%X 0x%X 0x%X", 205 res = sscanf(buf, "0x%X 0x%X 0x%X 0x%X",
210 &routing, &addr, &mask, &set); 206 &routing, &addr, &mask, &set);
@@ -221,15 +217,13 @@ static int shm32write__write_file(struct b43_wldev *dev,
221 if ((mask > 0xFFFFFFFF) || (set > 0xFFFFFFFF)) 217 if ((mask > 0xFFFFFFFF) || (set > 0xFFFFFFFF))
222 return -E2BIG; 218 return -E2BIG;
223 219
224 spin_lock_irqsave(&dev->wl->shm_lock, flags);
225 if (mask == 0) 220 if (mask == 0)
226 val = 0; 221 val = 0;
227 else 222 else
228 val = __b43_shm_read32(dev, routing, addr); 223 val = b43_shm_read32(dev, routing, addr);
229 val &= mask; 224 val &= mask;
230 val |= set; 225 val |= set;
231 __b43_shm_write32(dev, routing, addr, val); 226 b43_shm_write32(dev, routing, addr, val);
232 spin_unlock_irqrestore(&dev->wl->shm_lock, flags);
233 227
234 return 0; 228 return 0;
235} 229}