Convert the ehea_bcmb_regs.lock to a mutex.
Signed-off-by: Daniel Walker <dwalker@mvista.com>
---
drivers/net/ehea/ehea.h | 2 +-
drivers/net/ehea/ehea_main.c | 18 +++++++++---------
2 files changed, 10 insertions(+), 10 deletions(-)
Index: linux-2.6.24/drivers/net/ehea/ehea.h
===================================================================
--- linux-2.6.24.orig/drivers/net/ehea/ehea.h
+++ linux-2.6.24/drivers/net/ehea/ehea.h
@@ -434,7 +434,7 @@ struct ehea_bcmc_reg_entry {
struct ehea_bcmc_reg_array {
struct ehea_bcmc_reg_entry *arr;
int num_entries;
- struct semaphore lock;
+ struct mutex lock;
};
#define EHEA_PORT_UP 1
Index: linux-2.6.24/drivers/net/ehea/ehea_main.c
===================================================================
--- linux-2.6.24.orig/drivers/net/ehea/ehea_main.c
+++ linux-2.6.24/drivers/net/ehea/ehea_main.c
@@ -1759,7 +1759,7 @@ static int ehea_set_mac_addr(struct net_
memcpy(dev->dev_addr, mac_addr->sa_data, dev->addr_len);
- down(&ehea_bcmc_regs.lock);
+ mutex_lock(&ehea_bcmc_regs.lock);
/* Deregister old MAC in pHYP */
ret = ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
@@ -1777,7 +1777,7 @@ static int ehea_set_mac_addr(struct net_
out_upregs:
ehea_update_bcmc_registrations();
- up(&ehea_bcmc_regs.lock);
+ mutex_unlock(&ehea_bcmc_regs.lock);
out_free:
kfree(cb0);
out:
@@ -1939,7 +1939,7 @@ static void ehea_set_multicast_list(stru
}
ehea_promiscuous(dev, 0);
- down(&ehea_bcmc_regs.lock);
+ mutex_lock(&ehea_bcmc_regs.lock);
if (dev->flags & IFF_ALLMULTI) {
ehea_allmulti(dev, 1);
@@ -1970,7 +1970,7 @@ static void ehea_set_multicast_list(stru
}
out:
ehea_update_bcmc_registrations();
- up(&ehea_bcmc_regs.lock);
+ mutex_unlock(&ehea_bcmc_regs.lock);
return;
}
@@ -2491,7 +2491,7 @@ static int ehea_up(struct net_device *de
}
}
- down(&ehea_bcmc_regs.lock);
+ mutex_lock(&ehea_bcmc_regs.lock);
ret = ehea_broadcast_reg_helper(port, H_REG_BCMC);
if (ret) {
@@ -2514,7 +2514,7 @@ out:
ehea_info("Failed starting %s. ret=%i", dev->name, ret);
ehea_update_bcmc_registrations();
- up(&ehea_bcmc_regs.lock);
+ mutex_unlock(&ehea_bcmc_regs.lock);
ehea_update_firmware_handles();
mutex_unlock(&ehea_fw_handles.lock);
@@ -2569,7 +2569,7 @@ static int ehea_down(struct net_device *
mutex_lock(&ehea_fw_handles.lock);
- down(&ehea_bcmc_regs.lock);
+ mutex_lock(&ehea_bcmc_regs.lock);
ehea_drop_multicast_list(dev);
ehea_broadcast_reg_helper(port, H_DEREG_BCMC);
@@ -2578,7 +2578,7 @@ static int ehea_down(struct net_device *
port->state = EHEA_PORT_DOWN;
ehea_update_bcmc_registrations();
- up(&ehea_bcmc_regs.lock);
+ mutex_unlock(&ehea_bcmc_regs.lock);
ret = ehea_clean_all_portres(port);
if (ret)
@@ -3545,7 +3545,7 @@ int __init ehea_module_init(void)
memset(&ehea_bcmc_regs, 0, sizeof(ehea_bcmc_regs));
mutex_init(&ehea_fw_handles.lock);
- sema_init(&ehea_bcmc_regs.lock, 1);
+ mutex_init(&ehea_bcmc_regs.lock);
ret = check_module_parm();
if (ret)
--
--
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Jan Engelhardt | Re: Linux 2.6.21-rc4 |
| Alexey Dobriyan | ext2 reservations (Re: -mm merge plans for 2.6.23) |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Joakim Tjernlund | git-svn set-tree bug |
| Anatoly Yakovenko | GIT_SSL_NO_VERIFY=1 over http doesn't ignore a different ip address for the signed... |
| Benoit Sigoure | Re: Rebase/cherry-picking idea |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Theo de Raadt | That whole "Linux stealing our code" thing |
| Richard Stallman | Re: Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Richard Stallman | Real men don't attack straw men |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Linus Torvalds | Re: tcp bw in 2.6 |
| Theodore Tso | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Johannes Berg | Re: [PATCH] mac80211: rewrite fragmentation code |
| How to make my PCIE ATA storage device running in Linux | 2 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 5 hours ago | Linux kernel |
| Shared swap partition | 6 hours ago | Linux general |
| usb mic not detected | 10 hours ago | Applications and Utilities |
| Problem in Inserting a module | 11 hours ago | Linux kernel |
| Treason Uncloaked | 16 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
