aboutsummaryrefslogtreecommitdiff
path: root/drivers/ieee1394/raw1394-private.h
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-07-03 12:02:33 -0400
committerBen Collins <bcollins@ubuntu.com>2006-07-03 12:02:33 -0400
commit45289bf6ac70b106f5000d10b040e4485dd3e9d5 (patch)
treeb01499ed66e27d512b9c573bbd2a5fd78d761f1c /drivers/ieee1394/raw1394-private.h
parent438bd525e5240a48233cd3290f7fe66ff0167e20 (diff)
[PATCH] ieee1394: raw1394: remove redundant counting semaphore
An already existing wait queue replaces raw1394's complete_sem which was maintained in parallel to the wait queue. The role of the semaphore's counter is taken over by a direct check of what was really counted: The presence of items in the list of completed requests. Notes: - raw1394_release() sleeps uninterruptibly until all requests were completed. This is the same behaviour as before the patch. - The macros wait_event and wait_event_interruptible are called with a condition argument which has a side effect, i.e. manipulation of the requests list. This side effect happens only if the condition is true. The patch relies on the fact that wait_event[_interruptible] does not evaluate the condition again after it became true. - The diffstat looks unfavorable with respect to added lines of code. However 19 of them are comments, and some are due to separation of existing code blocks into two small helper functions. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Diffstat (limited to 'drivers/ieee1394/raw1394-private.h')
-rw-r--r--drivers/ieee1394/raw1394-private.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ieee1394/raw1394-private.h b/drivers/ieee1394/raw1394-private.h
index c93587be9ca..c7731d1bcd8 100644
--- a/drivers/ieee1394/raw1394-private.h
+++ b/drivers/ieee1394/raw1394-private.h
@@ -29,9 +29,8 @@ struct file_info {
struct list_head req_pending;
struct list_head req_complete;
- struct semaphore complete_sem;
spinlock_t reqlists_lock;
- wait_queue_head_t poll_wait_complete;
+ wait_queue_head_t wait_complete;
struct list_head addr_list;