From 44ad3d1cb96912a6397ceec39903a4d8c83253ea Mon Sep 17 00:00:00 2001 From: Bernard Xiong Date: Thu, 24 Sep 2015 20:46:59 +0800 Subject: [PATCH] [DeviceDrivers] Remove open_flag assertion. --- components/drivers/serial/serial.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/components/drivers/serial/serial.c b/components/drivers/serial/serial.c index f5a199e10b..3bae89c740 100644 --- a/components/drivers/serial/serial.c +++ b/components/drivers/serial/serial.c @@ -522,12 +522,10 @@ void rt_hw_serial_isr(struct rt_serial_device *serial, int event) rt_base_t level; struct rt_serial_rx_fifo* rx_fifo; + /* interrupt mode receive */ rx_fifo = (struct rt_serial_rx_fifo*)serial->serial_rx; RT_ASSERT(rx_fifo != RT_NULL); - - /* interrupt mode receive */ - RT_ASSERT(serial->parent.open_flag & RT_DEVICE_FLAG_INT_RX); - + while (1) { ch = serial->ops->getc(serial);