aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-07-03 12:02:36 -0400
committerBen Collins <bcollins@ubuntu.com>2006-07-03 12:02:36 -0400
commitcab8d154e2ed43fe1495aa0e18103e747552891b (patch)
tree038af3da7bb8c8579b98b8ca58e3077797927a27 /drivers
parentd2f119fe319528da8c76a1107459d6f478cbf28c (diff)
[PATCH] ieee1394: nodemgr: convert nodemgr_serialize semaphore to mutex
Another trivial sem2mutex conversion. Side note: nodemgr_serialize's purpose, when introduced in linux1394's revision 529 in July 2002, was to protect several data structures which are now largely handled by or together with Linux' driver core and are now protected by the LDM's own mechanisms. It may very well be possible to remove this mutex now. But fully parallelized node scanning is on our long-term TODO list anyway; the mutex will certainly go away then. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ieee1394/nodemgr.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index 2e6dc5990cef..f8f6079cc48c 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -158,7 +158,7 @@ static struct csr1212_bus_ops nodemgr_csr_ops = {
158 * but now we are much simpler because of the LDM. 158 * but now we are much simpler because of the LDM.
159 */ 159 */
160 160
161static DECLARE_MUTEX(nodemgr_serialize); 161static DEFINE_MUTEX(nodemgr_serialize);
162 162
163struct host_info { 163struct host_info {
164 struct hpsb_host *host; 164 struct hpsb_host *host;
@@ -1621,7 +1621,7 @@ static int nodemgr_host_thread(void *__hi)
1621 if (kthread_should_stop()) 1621 if (kthread_should_stop())
1622 goto exit; 1622 goto exit;
1623 1623
1624 if (down_interruptible(&nodemgr_serialize)) { 1624 if (mutex_lock_interruptible(&nodemgr_serialize)) {
1625 if (try_to_freeze()) 1625 if (try_to_freeze())
1626 continue; 1626 continue;
1627 goto exit; 1627 goto exit;
@@ -1650,7 +1650,7 @@ static int nodemgr_host_thread(void *__hi)
1650 if (!nodemgr_check_irm_capability(host, reset_cycles) || 1650 if (!nodemgr_check_irm_capability(host, reset_cycles) ||
1651 !nodemgr_do_irm_duties(host, reset_cycles)) { 1651 !nodemgr_do_irm_duties(host, reset_cycles)) {
1652 reset_cycles++; 1652 reset_cycles++;
1653 up(&nodemgr_serialize); 1653 mutex_unlock(&nodemgr_serialize);
1654 continue; 1654 continue;
1655 } 1655 }
1656 reset_cycles = 0; 1656 reset_cycles = 0;
@@ -1668,10 +1668,10 @@ static int nodemgr_host_thread(void *__hi)
1668 /* Update some of our sysfs symlinks */ 1668 /* Update some of our sysfs symlinks */
1669 nodemgr_update_host_dev_links(host); 1669 nodemgr_update_host_dev_links(host);
1670 1670
1671 up(&nodemgr_serialize); 1671 mutex_unlock(&nodemgr_serialize);
1672 } 1672 }
1673unlock_exit: 1673unlock_exit:
1674 up(&nodemgr_serialize); 1674 mutex_unlock(&nodemgr_serialize);
1675exit: 1675exit:
1676 HPSB_VERBOSE("NodeMgr: Exiting thread"); 1676 HPSB_VERBOSE("NodeMgr: Exiting thread");
1677 return 0; 1677 return 0;