From 057bdf6c75be6abdb14f38f33dd556bda1cded5f Mon Sep 17 00:00:00 2001 From: Youngmin Nam Date: Fri, 11 Dec 2015 10:32:39 +0900 Subject: [PATCH] serial: samsung: remove clock control in SICD notifer This patch removes clock control in SICD notifier. SICD notifier will be applied when the pm state of uart port is ON. Change-Id: I993f5e982734a325a554e0e45dd4f5da20513abc Signed-off-by: Youngmin Nam --- drivers/tty/serial/samsung.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/tty/serial/samsung.c b/drivers/tty/serial/samsung.c index 2ed0916ec685..6ae5d43e4be1 100644 --- a/drivers/tty/serial/samsung.c +++ b/drivers/tty/serial/samsung.c @@ -1480,14 +1480,15 @@ static int s3c24xx_serial_notifier(struct notifier_block *self, port = &ourport->port; + if (port->state->pm_state == UART_PM_STATE_OFF) + continue; + spin_lock_irqsave(&port->lock, flags); - uart_clock_enable(ourport); /* disable auto flow control & set nRTS for High */ umcon = rd_regl(port, S3C2410_UMCON); umcon &= ~(S3C2410_UMCOM_AFC | S3C2410_UMCOM_RTS_LOW); wr_regl(port, S3C2410_UMCON, umcon); - uart_clock_disable(ourport); spin_unlock_irqrestore(&port->lock, flags); } @@ -1501,14 +1502,15 @@ static int s3c24xx_serial_notifier(struct notifier_block *self, port = &ourport->port; + if (port->state->pm_state == UART_PM_STATE_OFF) + continue; + spin_lock_irqsave(&port->lock, flags); - uart_clock_enable(ourport); /* enable auto flow control */ umcon = rd_regl(port, S3C2410_UMCON); umcon |= S3C2410_UMCOM_AFC; wr_regl(port, S3C2410_UMCON, umcon); - uart_clock_disable(ourport); spin_unlock_irqrestore(&port->lock, flags); } -- 2.20.1