From: chao bi <chao.bi@intel.com>
To: Alan Cox <alan@linux.intel.com>
Cc: richardx.r.gorby@intel.com, jun.d.chen@intel.com,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] serial:ifx6x60:Delete SPI timer when shut down port
Date: Fri, 23 Nov 2012 09:25:09 +0800 [thread overview]
Message-ID: <1353633909.22077.12.camel@bichao> (raw)
In-Reply-To: <20121122110640.3fd5ef9b@bob.linux.org.uk>
On Thu, 2012-11-22 at 11:06 +0000, Alan Cox wrote:
> > --- a/drivers/tty/serial/ifx6x60.c
> > +++ b/drivers/tty/serial/ifx6x60.c
> > @@ -552,7 +552,10 @@ static void ifx_port_shutdown(struct tty_port
> > *port) container_of(port, struct ifx_spi_device, tty_port);
> >
> > mrdy_set_low(ifx_dev);
> > - clear_bit(IFX_SPI_STATE_TIMER_PENDING, &ifx_dev->flags);
> > + if (test_and_clear_bit(IFX_SPI_STATE_TIMER_PENDING,
> > + &ifx_dev->flags)) {
> > + del_timer(&ifx_dev->spi_timer);
> > + }
>
> You don't actually need the test here as far as I can see. Providing a
> timer has been initialised (init_timer) then running del_timer is safe
> even if the timer is not currently queued or has completed.
>
> Alan
Yes, thanks. I'll update it.
next prev parent reply other threads:[~2012-11-23 1:18 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 8:43 [PATCH] serial:ifx6x60:Delete SPI timer when shut down port chao bi
2012-11-22 11:06 ` Alan Cox
2012-11-23 1:25 ` chao bi [this message]
2012-11-23 1:33 chao bi
2012-11-26 23:45 ` Greg KH
2012-11-27 5:30 chao bi
2012-12-12 3:40 chao bi
2013-01-10 5:06 channing
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=1353633909.22077.12.camel@bichao \
--to=chao.bi@intel.com \
--cc=alan@linux.intel.com \
--cc=jun.d.chen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=richardx.r.gorby@intel.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).