diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 764ac7795694..45a25a01c44d 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -1496,9 +1496,24 @@ static int serial_omap_runtime_suspend(struct device *dev) | |||
1496 | if (!up) | 1496 | if (!up) |
1497 | return -EINVAL; | 1497 | return -EINVAL; |
1498 | 1498 | ||
1499 | if (!pdata->enable_wakeup) | ||
1500 | return 0; | ||
1501 | |||
1499 | if (pdata->get_context_loss_count) | 1502 | if (pdata->get_context_loss_count) |
1500 | up->context_loss_cnt = pdata->get_context_loss_count(dev); | 1503 | up->context_loss_cnt = pdata->get_context_loss_count(dev); |
1501 | 1504 | ||
1505 | if (device_may_wakeup(dev)) { | ||
1506 | if (!up->wakeups_enabled) { | ||
1507 | pdata->enable_wakeup(up->pdev, true); | ||
1508 | up->wakeups_enabled = true; | ||
1509 | } | ||
1510 | } else { | ||
1511 | if (up->wakeups_enabled) { | ||
1512 | pdata->enable_wakeup(up->pdev, false); | ||
1513 | up->wakeups_enabled = false; | ||
1514 | } | ||
1515 | } | ||
1516 | |||
1502 | /* Errata i291 */ | 1517 | /* Errata i291 */ |
1503 | if (up->use_dma && pdata->set_forceidle && | 1518 | if (up->use_dma && pdata->set_forceidle && |
1504 | (up->errata & UART_ERRATA_i291_DMA_FORCEIDLE)) | 1519 | (up->errata & UART_ERRATA_i291_DMA_FORCEIDLE)) |