diff options
author | Steven Rostedt <rostedt@goodmis.org> | 2006-01-09 18:59:26 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@hera.kernel.org> | 2006-01-09 18:59:26 -0500 |
commit | 906c3b75f6c09b4693a20387aaa6aaa50d327082 (patch) | |
tree | c45749fcb6f8f22d9e2666135b528c885856aaed /drivers/block/sx8.c | |
parent | 7892f2f48d165a34b0b8130c8a195dfd807b8cb6 (diff) |
[PATCH] mutex subsystem, semaphore to completion: SX8
change SX8 semaphores to completions.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/block/sx8.c')
-rw-r--r-- | drivers/block/sx8.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/block/sx8.c b/drivers/block/sx8.c index c0cdc182a8b0..4bdf95716e2b 100644 --- a/drivers/block/sx8.c +++ b/drivers/block/sx8.c | |||
@@ -27,8 +27,8 @@ | |||
27 | #include <linux/time.h> | 27 | #include <linux/time.h> |
28 | #include <linux/hdreg.h> | 28 | #include <linux/hdreg.h> |
29 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
30 | #include <linux/completion.h> | ||
30 | #include <asm/io.h> | 31 | #include <asm/io.h> |
31 | #include <asm/semaphore.h> | ||
32 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
33 | 33 | ||
34 | #if 0 | 34 | #if 0 |
@@ -303,7 +303,7 @@ struct carm_host { | |||
303 | 303 | ||
304 | struct work_struct fsm_task; | 304 | struct work_struct fsm_task; |
305 | 305 | ||
306 | struct semaphore probe_sem; | 306 | struct completion probe_comp; |
307 | }; | 307 | }; |
308 | 308 | ||
309 | struct carm_response { | 309 | struct carm_response { |
@@ -1346,7 +1346,7 @@ static void carm_fsm_task (void *_data) | |||
1346 | } | 1346 | } |
1347 | 1347 | ||
1348 | case HST_PROBE_FINISHED: | 1348 | case HST_PROBE_FINISHED: |
1349 | up(&host->probe_sem); | 1349 | complete(&host->probe_comp); |
1350 | break; | 1350 | break; |
1351 | 1351 | ||
1352 | case HST_ERROR: | 1352 | case HST_ERROR: |
@@ -1622,7 +1622,7 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1622 | host->flags = pci_dac ? FL_DAC : 0; | 1622 | host->flags = pci_dac ? FL_DAC : 0; |
1623 | spin_lock_init(&host->lock); | 1623 | spin_lock_init(&host->lock); |
1624 | INIT_WORK(&host->fsm_task, carm_fsm_task, host); | 1624 | INIT_WORK(&host->fsm_task, carm_fsm_task, host); |
1625 | init_MUTEX_LOCKED(&host->probe_sem); | 1625 | init_completion(&host->probe_comp); |
1626 | 1626 | ||
1627 | for (i = 0; i < ARRAY_SIZE(host->req); i++) | 1627 | for (i = 0; i < ARRAY_SIZE(host->req); i++) |
1628 | host->req[i].tag = i; | 1628 | host->req[i].tag = i; |
@@ -1691,8 +1691,8 @@ static int carm_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
1691 | if (rc) | 1691 | if (rc) |
1692 | goto err_out_free_irq; | 1692 | goto err_out_free_irq; |
1693 | 1693 | ||
1694 | DPRINTK("waiting for probe_sem\n"); | 1694 | DPRINTK("waiting for probe_comp\n"); |
1695 | down(&host->probe_sem); | 1695 | wait_for_completion(&host->probe_comp); |
1696 | 1696 | ||
1697 | printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n", | 1697 | printk(KERN_INFO "%s: pci %s, ports %d, io %lx, irq %u, major %d\n", |
1698 | host->name, pci_name(pdev), (int) CARM_MAX_PORTS, | 1698 | host->name, pci_name(pdev), (int) CARM_MAX_PORTS, |