From: chao bi <chao.bi@intel.com>
To: 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: [PATCH] serial:ifx6x60:Delete SPI timer when shut down port
Date: Thu, 22 Nov 2012 16:43:07 +0800 [thread overview]
Message-ID: <1353573787.22077.8.camel@bichao> (raw)
When shut down SPI port, it's possible that MRDY has been asserted and a SPI
timer was activated waiting for SRDY assert, in the case, it needs to delete
this timer.
Signed-off-by: Chen Jun <jun.d.chen@intel.com>
Signed-off-by: channing <chao.bi@intel.com>
---
drivers/tty/serial/ifx6x60.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/tty/serial/ifx6x60.c b/drivers/tty/serial/ifx6x60.c
index 5b9bc19..467020b 100644
--- 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);
+ }
tasklet_kill(&ifx_dev->io_work_tasklet);
}
--
1.7.1
next reply other threads:[~2012-11-22 8:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-22 8:43 chao bi [this message]
2012-11-22 11:06 ` [PATCH] serial:ifx6x60:Delete SPI timer when shut down port Alan Cox
2012-11-23 1:25 ` chao bi
-- strict thread matches above, loose matches on Subject: below --
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=1353573787.22077.8.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 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.