Re: [PATCH 2/2] TTY: serial, add pm function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/10/2012 01:34 PM, Rickard ANDERSSON wrote:
Add power management function to tty driver interface
and add implementation for serial core.

Signed-off-by: Rickard Andersson<rickard.andersson@xxxxxxxxxxxxxx>
---
  drivers/tty/serial/serial_core.c | 10 ++++++++++
  include/linux/tty_driver.h       |  8 ++++++++
  2 files changed, 18 insertions(+)

diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index b2fc8d7..3597dc8 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -1114,6 +1114,15 @@ static int uart_get_icount(struct tty_struct *tty,
  	return 0;
  }

+static int uart_pm(struct tty_struct *tty, enum tty_pm_state state)
+{
+	struct uart_state *ustate = tty->driver_data;
+
+	uart_change_pm(ustate, state);
I just realized that I should hold "port->mutex" while calling uart_change_pm(..).

I am waiting for further comments on the patch set.

BR
Rickard

--
To unsubscribe from this list: send the line "unsubscribe linux-serial" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux PPP]     [Linux FS]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Linmodem]     [Device Mapper]     [Linux Kernel for ARM]

  Powered by Linux