serial: st-asc: Avoid using irq_wake flag
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sun, 13 Aug 2017 14:47:40 +0000 (17:47 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 18:51:19 +0000 (20:51 +0200)
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: Patrice Chotard <patrice.chotard@st.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/st-asc.c

index 6b0ca65027d00162e6a8099527878cdea3599f82..b313a792b149d6425a47a5ddaca318f0af8afe78 100644 (file)
@@ -310,7 +310,7 @@ static void asc_receive_chars(struct uart_port *port)
        if (mode == ASC_CTL_MODE_8BIT || mode == ASC_CTL_MODE_8BIT_PAR)
                ignore_pe = true;
 
-       if (port->irq_wake)
+       if (irqd_is_wakeup_set(irq_get_irq_data(port->irq)))
                pm_wakeup_event(tport->tty->dev, 0);
 
        while ((status = asc_in(port, ASC_STA)) & ASC_STA_RBF) {