serial: samsung: remove clock control in SICD notifer
authorYoungmin Nam <youngmin.nam@samsung.com>
Fri, 11 Dec 2015 01:32:39 +0000 (10:32 +0900)
committermyung-su.cha <myung-su.cha@samsung.com>
Wed, 9 May 2018 12:14:45 +0000 (21:14 +0900)
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 <youngmin.nam@samsung.com>
drivers/tty/serial/samsung.c

index 2ed0916ec685ff5d0f9ff3452200b923595be635..6ae5d43e4be19e3eac55a330716a528d80c9a011 100644 (file)
@@ -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);
                }