+ make-8250_pnp-serial-driver-work-after.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     make 8250_pnp serial driver work after suspend to ram
has been added to the -mm tree.  Its filename is
     make-8250_pnp-serial-driver-work-after.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: make 8250_pnp serial driver work after suspend to ram
From: Mike Galbraith <efault@xxxxxx>

Add suspend/resume methods to drivers/serial/8250_pnp.c.  Tested on a
P4/HT 16550A box, ttyS0 login survives across suspend to ram.

Signed-off-by: Mike Galbraith <efault@xxxxxx>
Cc: "Rafael J. Wysocki" <rjw@xxxxxxx>
Cc: Pavel Machek <pavel@xxxxxx>
Cc: Russell King <rmk@xxxxxxxxxxxxxxxx>
Cc: Adam Belay <ambx1@xxxxxxxxxx>
Cc: Bjorn Helgaas <bjorn.helgaas@xxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/serial/8250_pnp.c |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletion(-)

diff -puN drivers/serial/8250_pnp.c~make-8250_pnp-serial-driver-work-after drivers/serial/8250_pnp.c
--- a/drivers/serial/8250_pnp.c~make-8250_pnp-serial-driver-work-after
+++ a/drivers/serial/8250_pnp.c
@@ -464,11 +464,38 @@ static void __devexit serial_pnp_remove(
 		serial8250_unregister_port(line - 1);
 }
 
+#ifdef CONFIG_PM
+static int serial_pnp_suspend(struct pnp_dev *dev, pm_message_t state)
+{
+	long line = (long)pnp_get_drvdata(dev);
+
+	if (!line)
+		return -ENODEV;
+	serial8250_suspend_port(line - 1);
+	return 0;
+}
+
+static int serial_pnp_resume(struct pnp_dev *dev)
+{
+	long line = (long)pnp_get_drvdata(dev);
+
+	if (!line)
+		return -ENODEV;
+	serial8250_resume_port(line - 1);
+	return 0;
+}
+
+#endif /* CONFIG_PM */
+
 static struct pnp_driver serial_pnp_driver = {
 	.name		= "serial",
-	.id_table	= pnp_dev_table,
 	.probe		= serial_pnp_probe,
 	.remove		= __devexit_p(serial_pnp_remove),
+#ifdef CONFIG_PM
+	.suspend	= serial_pnp_suspend,
+	.resume		= serial_pnp_resume,
+#endif
+	.id_table	= pnp_dev_table,
 };
 
 static int __init serial8250_pnp_init(void)
_

Patches currently in -mm which might be from efault@xxxxxx are

remove-the-syslog-interface-when-printk-is-disabled.patch
make-8250_pnp-serial-driver-work-after.patch
make-8250_pnp-serial-driver-work-after-tidy.patch
sched-improve-migration-accuracy.patch
sched-improve-migration-accuracy-tidy.patch
sched-improve-migration-accuracy-fix.patch
readahead-call-scheme.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux