Prevent PNP bus from powering down the serial console device
when suspending if the no_console_suspend command line option is set.

Signed-off-by: Peter Hurley <[email protected]>
---
 drivers/tty/serial/8250/8250_pnp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_pnp.c 
b/drivers/tty/serial/8250/8250_pnp.c
index 50b7c89..4aefaf2 100644
--- a/drivers/tty/serial/8250/8250_pnp.c
+++ b/drivers/tty/serial/8250/8250_pnp.c
@@ -487,7 +487,7 @@ serial_pnp_probe(struct pnp_dev *dev, const struct 
pnp_device_id *dev_id)
 
        if (uart_console(&port8250->port) && !console_suspend_enabled) {
                info->override_disable = !!(dev->capabilities & PNP_DISABLE);
-               dev->capabilities &= ~PNP_DISABLE;
+               dev->capabilities &= ~(PNP_DISABLE | PNP_SUSPEND);
        }
 
        pnp_set_drvdata(dev, info);
@@ -502,6 +502,7 @@ static void serial_pnp_remove(struct pnp_dev *dev)
                serial8250_unregister_port(info->line);
                if (info->override_disable)
                        dev->capabilities |= PNP_DISABLE;
+               dev->capabilities |= PNP_SUSPEND;
        }
 }
 
-- 
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to