From: Dan Carpenter <dan.carpenter@oracle.com>
To: Daeseok Youn <daeseok.youn@gmail.com>
Cc: lidza.louina@gmail.com, markh@compro.net,
devel@driverdev.osuosl.org, gregkh@linuxfoundation.org,
driverdev-devel@linuxdriverproject.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] staging: dgap: use schedule_timeout_interruptible() instead of dgap_ms_sleep()
Date: Tue, 16 Sep 2014 09:31:15 +0300 [thread overview]
Message-ID: <20140916063115.GF17875@mwanda> (raw)
In-Reply-To: <20140916033333.GA26821@devel>
On Tue, Sep 16, 2014 at 12:33:33PM +0900, Daeseok Youn wrote:
> @@ -2297,12 +2273,12 @@ static void dgap_tty_close(struct tty_struct *tty, struct file *file)
> * Go to sleep to ensure RTS/DTR
> * have been dropped for modems to see it.
> */
> - if (ch->ch_close_delay) {
> - spin_unlock_irqrestore(&ch->ch_lock,
> - lock_flags);
> - dgap_ms_sleep(ch->ch_close_delay);
> - spin_lock_irqsave(&ch->ch_lock, lock_flags);
> - }
> + spin_unlock_irqrestore(&ch->ch_lock,
> + lock_flags);
> + /* .25 second delay for dropping RTS/DTR */
> + schedule_timeout_interruptible(msecs_to_jiffies(250));
> + signal_pending(current);
There is no point in calling signal_pending() if you don't care about
the return value.
> + spin_lock_irqsave(&ch->ch_lock, lock_flags);
> }
>
regards,
dan carpenter
next prev parent reply other threads:[~2014-09-16 6:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-16 3:33 [PATCH] staging: dgap: use schedule_timeout_interruptible() instead of dgap_ms_sleep() Daeseok Youn
2014-09-16 6:31 ` Dan Carpenter [this message]
2014-09-16 7:16 ` DaeSeok Youn
2014-09-16 7:54 ` Joe Perches
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140916063115.GF17875@mwanda \
--to=dan.carpenter@oracle.com \
--cc=daeseok.youn@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=driverdev-devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=lidza.louina@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markh@compro.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.