Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338360
b: refs/heads/master
c: b61c5ed
h: refs/heads/master
v: v3
  • Loading branch information
James Hogan authored and Greg Kroah-Hartman committed Oct 24, 2012
1 parent 2829e0b commit 6332625
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 59c2e855e43735f4ab93b8b8db96206219f6c1d4
refs/heads/master: b61c5ed57195ec97006d8d3ede1f583f6618b79e
25 changes: 25 additions & 0 deletions trunk/drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,29 @@ static int __devexit dw8250_remove(struct platform_device *pdev)
return 0;
}

#ifdef CONFIG_PM
static int dw8250_suspend(struct platform_device *pdev, pm_message_t state)
{
struct dw8250_data *data = platform_get_drvdata(pdev);

serial8250_suspend_port(data->line);

return 0;
}

static int dw8250_resume(struct platform_device *pdev)
{
struct dw8250_data *data = platform_get_drvdata(pdev);

serial8250_resume_port(data->line);

return 0;
}
#else
#define dw8250_suspend NULL
#define dw8250_resume NULL
#endif /* CONFIG_PM */

static const struct of_device_id dw8250_match[] = {
{ .compatible = "snps,dw-apb-uart" },
{ /* Sentinel */ }
Expand All @@ -175,6 +198,8 @@ static struct platform_driver dw8250_platform_driver = {
},
.probe = dw8250_probe,
.remove = __devexit_p(dw8250_remove),
.suspend = dw8250_suspend,
.resume = dw8250_resume,
};

module_platform_driver(dw8250_platform_driver);
Expand Down

0 comments on commit 6332625

Please sign in to comment.