Skip to content

Commit

Permalink
serial: stm32-usart: Avoid using irq_wake flag
Browse files Browse the repository at this point in the history
There is no need to duplicate a flag which IRQ core takes care of.

Replace custom flag by IRQ core API that retrieves its state.

Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@st.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Andy Shevchenko authored and Greg Kroah-Hartman committed Aug 28, 2017
1 parent 7b8a035 commit 29d6098
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/stm32-usart.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ static void stm32_receive_chars(struct uart_port *port, bool threaded)
u32 sr;
char flag;

if (port->irq_wake)
if (irqd_is_wakeup_set(irq_get_irq_data(port->irq)))
pm_wakeup_event(tport->tty->dev, 0);

while (stm32_pending_rx(port, &sr, &stm32_port->last_res, threaded)) {
Expand Down

0 comments on commit 29d6098

Please sign in to comment.