From 01395d798452435f19de3bfe5d04325db4e49677 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Thu, 22 Jan 2015 11:50:24 -0500 Subject: PNP: Allow console to override ACPI device sleep If the serial console is an ACPI PNP device, the PNP bus always powers down the device at system suspend, even though the no_console_suspend command line parameter is specified (eg., when debugging suspend/resume). Add PNP_CONSOLE capability, which when set, prevents calling both the ->disable() and ->suspend() PNP protocol methods if console suspend is disabled. Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- drivers/pnp/driver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/pnp') diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c index f748cc8..4e57d33 100644 --- a/drivers/pnp/driver.c +++ b/drivers/pnp/driver.c @@ -182,7 +182,7 @@ static int __pnp_bus_suspend(struct device *dev, pm_message_t state) return error; } - if (pnp_dev->protocol->suspend) + if (pnp_can_suspend(pnp_dev)) pnp_dev->protocol->suspend(pnp_dev, state); return 0; } -- cgit v1.1