mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] serial: 8250: switch to dev_pm_ops
@ 2009-07-25 12:17 Arnaud Faucher
  2009-07-25 13:35 ` Frans Pop
  0 siblings, 1 reply; 2+ messages in thread
From: Arnaud Faucher @ 2009-07-25 12:17 UTC (permalink / raw)
  To: linux-kernel; +Cc: Arnaud Faucher


Signed-off-by: Arnaud Faucher <arnaud.faucher@gmail.com>
---
 drivers/serial/8250.c |   16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index fb867a9..e6b41b1 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -2982,42 +2982,46 @@ static int __devexit serial8250_remove(struct platform_device *dev)
 	return 0;
 }
 
-static int serial8250_suspend(struct platform_device *dev, pm_message_t state)
+static int serial8250_suspend(struct device *dev)
 {
 	int i;
 
 	for (i = 0; i < UART_NR; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
-		if (up->port.type != PORT_UNKNOWN && up->port.dev == &dev->dev)
+		if (up->port.type != PORT_UNKNOWN && up->port.dev == dev)
 			uart_suspend_port(&serial8250_reg, &up->port);
 	}
 
 	return 0;
 }
 
-static int serial8250_resume(struct platform_device *dev)
+static int serial8250_resume(struct device *dev)
 {
 	int i;
 
 	for (i = 0; i < UART_NR; i++) {
 		struct uart_8250_port *up = &serial8250_ports[i];
 
-		if (up->port.type != PORT_UNKNOWN && up->port.dev == &dev->dev)
+		if (up->port.type != PORT_UNKNOWN && up->port.dev == dev)
 			serial8250_resume_port(i);
 	}
 
 	return 0;
 }
 
+static struct dev_pm_ops serial8250_pm_ops = {
+	.suspend	= serial8250_suspend,
+	.resume		= serial8250_resume,
+};
+
 static struct platform_driver serial8250_isa_driver = {
 	.probe		= serial8250_probe,
 	.remove		= __devexit_p(serial8250_remove),
-	.suspend	= serial8250_suspend,
-	.resume		= serial8250_resume,
 	.driver		= {
 		.name	= "serial8250",
 		.owner	= THIS_MODULE,
+		.pm	= &serial8250_pm_ops,
 	},
 };
 
-- 
1.6.3.3


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] serial: 8250: switch to dev_pm_ops
  2009-07-25 12:17 [PATCH] serial: 8250: switch to dev_pm_ops Arnaud Faucher
@ 2009-07-25 13:35 ` Frans Pop
  0 siblings, 0 replies; 2+ messages in thread
From: Frans Pop @ 2009-07-25 13:35 UTC (permalink / raw)
  To: Arnaud Faucher; +Cc: linux-kernel, arnaud.faucher

Arnaud Faucher wrote:
> Signed-off-by: Arnaud Faucher <arnaud.faucher@gmail.com>
> ---
>  drivers/serial/8250.c |   16 ++++++++++------
>  1 files changed, 10 insertions(+), 6 deletions(-)

The same patch has already been proposed in 
http://lkml.org/lkml/2009/7/1/44.

Cheers,
FJP

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-07-25 13:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-25 12:17 [PATCH] serial: 8250: switch to dev_pm_ops Arnaud Faucher
2009-07-25 13:35 ` Frans Pop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®