[PATCH 66/80] serial: Remove redundant pm_runtime_mark_last_busy() calls
From: Sakari Ailus <sakari.ailus@linux.intel.com>
Date: 2025-07-04 07:55:12
Also in:
linux-serial, lkml
Subsystem:
8250/16?50 (and clone uarts) serial driver, the rest, tty layer and serial drivers, xilinx uartlite serial driver · Maintainers:
Greg Kroah-Hartman, Linus Torvalds, Jiri Slaby, Peter Korsgaard
pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(), pm_runtime_autosuspend() and pm_request_autosuspend() now include a call to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to pm_runtime_mark_last_busy(). Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> --- The cover letter of the set can be found here <URL:https://lore.kernel.org/linux-pm/20250704075225.3212486-1-sakari.ailus@linux.intel.com (local)>. In brief, this patch depends on PM runtime patches adding marking the last busy timestamp in autosuspend related functions. The patches are here, on rc2: git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git \ pm-runtime-6.17-rc1 drivers/tty/serial/8250/8250_omap.c | 9 --------- drivers/tty/serial/8250/8250_port.c | 2 -- drivers/tty/serial/fsl_lpuart.c | 1 - drivers/tty/serial/serial_core.c | 1 - drivers/tty/serial/uartlite.c | 2 -- drivers/tty/serial/xilinx_uartps.c | 1 - 6 files changed, 16 deletions(-)
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c
index 6707f55bdbe7..091afea71b95 100644
--- a/drivers/tty/serial/8250/8250_omap.c
+++ b/drivers/tty/serial/8250/8250_omap.c@@ -207,7 +207,6 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl) __omap8250_set_mctrl(port, mctrl); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); }
@@ -516,7 +515,6 @@ static void omap_8250_set_termios(struct uart_port *port, omap8250_restore_regs(up); uart_port_unlock_irq(&up->port); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); /* calculate wakeup latency constraint */
@@ -554,7 +552,6 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state, uart_port_unlock_irq(port); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); }
@@ -773,7 +770,6 @@ static int omap_8250_startup(struct uart_port *port) enable_irq(port->irq); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); return 0; }
@@ -811,7 +807,6 @@ static void omap_8250_shutdown(struct uart_port *port) serial_out(up, UART_LCR, up->lcr & ~UART_LCR_SBC); serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); }
@@ -827,7 +822,6 @@ static void omap_8250_throttle(struct uart_port *port) priv->throttled = true; uart_port_unlock_irqrestore(port, flags); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); }
@@ -848,7 +842,6 @@ static void omap_8250_unthrottle(struct uart_port *port) serial_out(up, UART_IER, up->ier); uart_port_unlock_irqrestore(port, flags); - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); }
@@ -1594,7 +1587,6 @@ static int omap8250_probe(struct platform_device *pdev) goto err; } priv->line = ret; - pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return 0; err:
@@ -1682,7 +1674,6 @@ static int omap8250_resume(struct device *dev) serial8250_resume_port(priv->line); /* Paired with pm_runtime_resume_and_get() in omap8250_suspend() */ - pm_runtime_mark_last_busy(dev); pm_runtime_put_autosuspend(dev); return 0;
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 7eddcab318b4..22ad70117c44 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c@@ -519,7 +519,6 @@ static void serial8250_rpm_put(struct uart_8250_port *p) { if (!(p->capabilities & UART_CAP_RPM)) return; - pm_runtime_mark_last_busy(p->port.dev); pm_runtime_put_autosuspend(p->port.dev); }
@@ -659,7 +658,6 @@ static void serial8250_rpm_put_tx(struct uart_8250_port *p) rpm_active = xchg(&p->rpm_tx_active, 0); if (!rpm_active) return; - pm_runtime_mark_last_busy(p->port.dev); pm_runtime_put_autosuspend(p->port.dev); }
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index c9519e649e82..79050a42cd1b 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c@@ -825,7 +825,6 @@ lpuart_uart_pm(struct uart_port *port, unsigned int state, unsigned int oldstate { switch (state) { case UART_PM_STATE_OFF: - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); break; default:
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index 86d404d649a3..f9fc9afcd845 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c@@ -159,7 +159,6 @@ static void __uart_start(struct uart_state *state) */ if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev)) port->ops->start_tx(port); - pm_runtime_mark_last_busy(&port_dev->dev); pm_runtime_put_autosuspend(&port_dev->dev); }
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index 39c1fd1ff9ce..c21cd5f5be27 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c@@ -422,7 +422,6 @@ static void ulite_pm(struct uart_port *port, unsigned int state, if (ret < 0) dev_err(port->dev, "Failed to enable clocks\n"); } else { - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); } }
@@ -882,7 +881,6 @@ static int ulite_probe(struct platform_device *pdev) ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata); - pm_runtime_mark_last_busy(&pdev->dev); pm_runtime_put_autosuspend(&pdev->dev); return ret;
diff --git a/drivers/tty/serial/xilinx_uartps.c b/drivers/tty/serial/xilinx_uartps.c
index fe457bf1e15b..36afa2a8f158 100644
--- a/drivers/tty/serial/xilinx_uartps.c
+++ b/drivers/tty/serial/xilinx_uartps.c@@ -1240,7 +1240,6 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state, { switch (state) { case UART_PM_STATE_OFF: - pm_runtime_mark_last_busy(port->dev); pm_runtime_put_autosuspend(port->dev); break; default:
--
2.39.5