Char: rocket, switch sleep_on to completion

rocket, switch sleep_on to completion

- sleep_on is deprecated and racy, use completion instead
- also check retval of interruptible function and return ERESTARTSYS
  eventually

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Jiri Slaby
2007-10-18 03:06:25 -07:00
committed by Linus Torvalds
parent 95e0791480
commit 8cf5a8c572
2 changed files with 9 additions and 10 deletions

View File

@ -1163,13 +1163,8 @@ struct r_port {
int read_status_mask;
int cps;
#ifdef DECLARE_WAITQUEUE
wait_queue_head_t open_wait;
wait_queue_head_t close_wait;
#else
struct wait_queue *open_wait;
struct wait_queue *close_wait;
#endif
struct completion close_wait;
spinlock_t slock;
struct mutex write_mtx;
};