From: Youngmin Nam Date: Fri, 11 Dec 2015 01:32:39 +0000 (+0900) Subject: serial: samsung: remove clock control in SICD notifer X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=057bdf6c75be6abdb14f38f33dd556bda1cded5f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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); }