Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 99246
b: refs/heads/master
c: f826caa
h: refs/heads/master
v: v3
  • Loading branch information
Haavard Skinnemoen authored and Haavard Skinnemoen committed Jul 2, 2008
1 parent 8dbbc52 commit 9138a27
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 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: 38510754a50192a072210e24fdc4ae65592182f0
refs/heads/master: f826caa44902ddbe93174f0b642d8abf9698c08e
11 changes: 10 additions & 1 deletion trunk/drivers/serial/atmel_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -1439,14 +1439,23 @@ static struct uart_driver atmel_uart = {
};

#ifdef CONFIG_PM
static bool atmel_serial_clk_will_stop(void)
{
#ifdef CONFIG_ARCH_AT91
return at91_suspend_entering_slow_clock();
#else
return false;
#endif
}

static int atmel_serial_suspend(struct platform_device *pdev,
pm_message_t state)
{
struct uart_port *port = platform_get_drvdata(pdev);
struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);

if (device_may_wakeup(&pdev->dev)
&& !at91_suspend_entering_slow_clock())
&& !atmel_serial_clk_will_stop())
enable_irq_wake(port->irq);
else {
uart_suspend_port(&atmel_uart, port);
Expand Down

0 comments on commit 9138a27

Please sign in to comment.