diff options
author | Hari Prasath Gujulan Elango <hgujulan@visteon.com> | 2016-02-08 06:39:21 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-11 19:51:46 -0800 |
commit | 127bf16602c47ed3c6b5ee619ac101316ea9b972 (patch) | |
tree | a365cd6ac272d51d9e3fb01fce1e88e6f14354e3 /drivers/staging/dgnc | |
parent | 210ba93a18c1192e92c3db7435b595c1fd00a510 (diff) | |
download | linux-127bf16602c47ed3c6b5ee619ac101316ea9b972.tar.bz2 |
staging: dgnc: convert to wait_event_interruptible_timeout
This patch makes use of wait_event_interruptible_timeout to achieve
timeout functionality.This is a TODO mentiond in the comment which is also
removed.It also aligns with what the function is supposed to do as in the
comments.
Signed-off-by: Hari Prasath Gujulan Elango <hgujulan@visteon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/dgnc')
-rw-r--r-- | drivers/staging/dgnc/dgnc_neo.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/dgnc/dgnc_neo.c b/drivers/staging/dgnc/dgnc_neo.c index 39c76e78e56a..ee3155bcc6d2 100644 --- a/drivers/staging/dgnc/dgnc_neo.c +++ b/drivers/staging/dgnc/dgnc_neo.c @@ -1306,10 +1306,10 @@ static int neo_drain(struct tty_struct *tty, uint seconds) /* * Go to sleep waiting for the tty layer to wake me back up when * the empty flag goes away. - * - * NOTE: TODO: Do something with time passed in. */ - rc = wait_event_interruptible(un->un_flags_wait, ((un->un_flags & UN_EMPTY) == 0)); + rc = wait_event_interruptible_timeout(un->un_flags_wait, + ((un->un_flags & UN_EMPTY) == 0), + msecs_to_jiffies(seconds * 1000)); /* If ret is non-zero, user ctrl-c'ed us */ return rc; |