Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 166104
b: refs/heads/master
c: bf56c75
h: refs/heads/master
v: v3
  • Loading branch information
Mike Rapoport authored and Eric Miao committed Sep 10, 2009
1 parent f7a8262 commit 65ba227
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43ddc00696c96a265a7fc48050b32fd0ed9d59e7
refs/heads/master: bf56c751fa25edf12528e7cef90fb276c3fff17a
20 changes: 14 additions & 6 deletions trunk/drivers/serial/pxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -726,26 +726,33 @@ static struct uart_driver serial_pxa_reg = {
.cons = PXA_CONSOLE,
};

static int serial_pxa_suspend(struct platform_device *dev, pm_message_t state)
#ifdef CONFIG_PM
static int serial_pxa_suspend(struct device *dev)
{
struct uart_pxa_port *sport = platform_get_drvdata(dev);
struct uart_pxa_port *sport = dev_get_drvdata(dev);

if (sport)
uart_suspend_port(&serial_pxa_reg, &sport->port);

return 0;
}

static int serial_pxa_resume(struct platform_device *dev)
static int serial_pxa_resume(struct device *dev)
{
struct uart_pxa_port *sport = platform_get_drvdata(dev);
struct uart_pxa_port *sport = dev_get_drvdata(dev);

if (sport)
uart_resume_port(&serial_pxa_reg, &sport->port);

return 0;
}

static struct dev_pm_ops serial_pxa_pm_ops = {
.suspend = serial_pxa_suspend,
.resume = serial_pxa_resume,
};
#endif

static int serial_pxa_probe(struct platform_device *dev)
{
struct uart_pxa_port *sport;
Expand Down Expand Up @@ -825,11 +832,12 @@ static struct platform_driver serial_pxa_driver = {
.probe = serial_pxa_probe,
.remove = serial_pxa_remove,

.suspend = serial_pxa_suspend,
.resume = serial_pxa_resume,
.driver = {
.name = "pxa2xx-uart",
.owner = THIS_MODULE,
#ifdef CONFIG_PM
.pm = &serial_pxa_pm_ops,
#endif
},
};

Expand Down

0 comments on commit 65ba227

Please sign in to comment.