diff options
author | John W. Linville <linville@tuxdriver.com> | 2006-07-27 18:10:00 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2006-07-27 18:24:54 -0400 |
commit | f1207ba1a756610a9880fe4b70d7f0e9f0627073 (patch) | |
tree | f6840b54e05cbffb70e64e9646245b0068217b03 | |
parent | 27be44ff8ee29e945adad226cc360c9278239d17 (diff) |
[PATCH] bcm43xx: fix-up build breakage from merging patches out of order
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_main.c | 16 | ||||
-rw-r--r-- | drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c | 8 |
3 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c index 634d3d8093cf..923275ea0789 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_debugfs.c | |||
@@ -331,7 +331,8 @@ static ssize_t restart_write_file(struct file *file, const char __user *user_buf | |||
331 | res = -EFAULT; | 331 | res = -EFAULT; |
332 | goto out_up; | 332 | goto out_up; |
333 | } | 333 | } |
334 | bcm43xx_lock_irqsafe(bcm, flags); | 334 | mutex_lock(&(bcm)->mutex); |
335 | spin_lock_irqsave(&(bcm)->irq_lock, flags); | ||
335 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { | 336 | if (bcm43xx_status(bcm) != BCM43xx_STAT_INITIALIZED) { |
336 | printk(KERN_INFO PFX "debugfs: Board not initialized.\n"); | 337 | printk(KERN_INFO PFX "debugfs: Board not initialized.\n"); |
337 | res = -EFAULT; | 338 | res = -EFAULT; |
@@ -344,7 +345,8 @@ static ssize_t restart_write_file(struct file *file, const char __user *user_buf | |||
344 | res = -EINVAL; | 345 | res = -EINVAL; |
345 | 346 | ||
346 | out_unlock: | 347 | out_unlock: |
347 | bcm43xx_unlock_irqsafe(bcm, flags); | 348 | spin_unlock_irqrestore(&(bcm)->irq_lock, flags); |
349 | mutex_unlock(&(bcm)->mutex); | ||
348 | out_up: | 350 | out_up: |
349 | up(&big_buffer_sem); | 351 | up(&big_buffer_sem); |
350 | return res; | 352 | return res; |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_main.c b/drivers/net/wireless/bcm43xx/bcm43xx_main.c index e5829056cc3f..24d531eb00fa 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_main.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_main.c | |||
@@ -3199,9 +3199,9 @@ static int bcm43xx_rng_read(struct hwrng *rng, u32 *data) | |||
3199 | struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv; | 3199 | struct bcm43xx_private *bcm = (struct bcm43xx_private *)rng->priv; |
3200 | unsigned long flags; | 3200 | unsigned long flags; |
3201 | 3201 | ||
3202 | bcm43xx_lock_irqonly(bcm, flags); | 3202 | spin_lock_irqsave(&(bcm)->irq_lock, flags); |
3203 | *data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG); | 3203 | *data = bcm43xx_read16(bcm, BCM43xx_MMIO_RNG); |
3204 | bcm43xx_unlock_irqonly(bcm, flags); | 3204 | spin_unlock_irqrestore(&(bcm)->irq_lock, flags); |
3205 | 3205 | ||
3206 | return (sizeof(u16)); | 3206 | return (sizeof(u16)); |
3207 | } | 3207 | } |
@@ -3264,10 +3264,10 @@ static void bcm43xx_free_board(struct bcm43xx_private *bcm) | |||
3264 | bcm43xx_sysfs_unregister(bcm); | 3264 | bcm43xx_sysfs_unregister(bcm); |
3265 | bcm43xx_periodic_tasks_delete(bcm); | 3265 | bcm43xx_periodic_tasks_delete(bcm); |
3266 | 3266 | ||
3267 | bcm43xx_lock_noirq(bcm); | 3267 | mutex_lock(&(bcm)->mutex); |
3268 | bcm43xx_shutdown_all_wireless_cores(bcm); | 3268 | bcm43xx_shutdown_all_wireless_cores(bcm); |
3269 | bcm43xx_pctl_set_crystal(bcm, 0); | 3269 | bcm43xx_pctl_set_crystal(bcm, 0); |
3270 | bcm43xx_unlock_noirq(bcm); | 3270 | mutex_unlock(&(bcm)->mutex); |
3271 | } | 3271 | } |
3272 | 3272 | ||
3273 | static void prepare_phydata_for_init(struct bcm43xx_phyinfo *phy) | 3273 | static void prepare_phydata_for_init(struct bcm43xx_phyinfo *phy) |
@@ -3511,7 +3511,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm) | |||
3511 | { | 3511 | { |
3512 | int err; | 3512 | int err; |
3513 | 3513 | ||
3514 | bcm43xx_lock_noirq(bcm); | 3514 | mutex_lock(&(bcm)->mutex); |
3515 | 3515 | ||
3516 | tasklet_enable(&bcm->isr_tasklet); | 3516 | tasklet_enable(&bcm->isr_tasklet); |
3517 | err = bcm43xx_pctl_set_crystal(bcm, 1); | 3517 | err = bcm43xx_pctl_set_crystal(bcm, 1); |
@@ -3533,7 +3533,7 @@ static int bcm43xx_init_board(struct bcm43xx_private *bcm) | |||
3533 | schedule_work(&bcm->softmac->associnfo.work); | 3533 | schedule_work(&bcm->softmac->associnfo.work); |
3534 | 3534 | ||
3535 | out: | 3535 | out: |
3536 | bcm43xx_unlock_noirq(bcm); | 3536 | mutex_unlock(&(bcm)->mutex); |
3537 | 3537 | ||
3538 | return err; | 3538 | return err; |
3539 | 3539 | ||
@@ -4097,10 +4097,10 @@ static void bcm43xx_chip_reset(void *_bcm) | |||
4097 | struct bcm43xx_phyinfo *phy; | 4097 | struct bcm43xx_phyinfo *phy; |
4098 | int err; | 4098 | int err; |
4099 | 4099 | ||
4100 | bcm43xx_lock_noirq(bcm); | 4100 | mutex_lock(&(bcm)->mutex); |
4101 | phy = bcm43xx_current_phy(bcm); | 4101 | phy = bcm43xx_current_phy(bcm); |
4102 | err = bcm43xx_select_wireless_core(bcm, phy->type); | 4102 | err = bcm43xx_select_wireless_core(bcm, phy->type); |
4103 | bcm43xx_unlock_noirq(bcm); | 4103 | mutex_unlock(&(bcm)->mutex); |
4104 | 4104 | ||
4105 | printk(KERN_ERR PFX "Controller restart%s\n", | 4105 | printk(KERN_ERR PFX "Controller restart%s\n", |
4106 | (err == 0) ? "ed" : " failed"); | 4106 | (err == 0) ? "ed" : " failed"); |
diff --git a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c index ac394013cd98..ece335178f6a 100644 --- a/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c +++ b/drivers/net/wireless/bcm43xx/bcm43xx_sysfs.c | |||
@@ -333,9 +333,9 @@ static ssize_t bcm43xx_attr_phymode_store(struct device *dev, | |||
333 | goto out; | 333 | goto out; |
334 | } | 334 | } |
335 | 335 | ||
336 | bcm43xx_lock_noirq(bcm); | 336 | mutex_lock(&(bcm)->mutex); |
337 | err = bcm43xx_select_wireless_core(bcm, phytype); | 337 | err = bcm43xx_select_wireless_core(bcm, phytype); |
338 | bcm43xx_unlock_noirq(bcm); | 338 | mutex_unlock(&(bcm)->mutex); |
339 | if (err == -ESRCH) | 339 | if (err == -ESRCH) |
340 | err = -ENODEV; | 340 | err = -ENODEV; |
341 | 341 | ||
@@ -350,7 +350,7 @@ static ssize_t bcm43xx_attr_phymode_show(struct device *dev, | |||
350 | struct bcm43xx_private *bcm = dev_to_bcm(dev); | 350 | struct bcm43xx_private *bcm = dev_to_bcm(dev); |
351 | ssize_t count = 0; | 351 | ssize_t count = 0; |
352 | 352 | ||
353 | bcm43xx_lock_noirq(bcm); | 353 | mutex_lock(&(bcm)->mutex); |
354 | switch (bcm43xx_current_phy(bcm)->type) { | 354 | switch (bcm43xx_current_phy(bcm)->type) { |
355 | case BCM43xx_PHYTYPE_A: | 355 | case BCM43xx_PHYTYPE_A: |
356 | snprintf(buf, PAGE_SIZE, "A"); | 356 | snprintf(buf, PAGE_SIZE, "A"); |
@@ -364,7 +364,7 @@ static ssize_t bcm43xx_attr_phymode_show(struct device *dev, | |||
364 | default: | 364 | default: |
365 | assert(0); | 365 | assert(0); |
366 | } | 366 | } |
367 | bcm43xx_unlock_noirq(bcm); | 367 | mutex_unlock(&(bcm)->mutex); |
368 | 368 | ||
369 | return count; | 369 | return count; |
370 | } | 370 | } |