Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

printk: Rename console_stop to console_suspend

The intent of console_stop was in fact to suspend it, so rename the
function accordingly.

Signed-off-by: Marcos Paulo de Souza <mpdesouza@suse.com>
Reviewed-by: Petr Mladek <pmladek@suse.com>
Reviewed-by: John Ogness <john.ogness@linutronix.de>
Link: https://lore.kernel.org/r/20250226-printk-renaming-v1-3-0b878577f2e6@suse.com
[pmladek@suse.com: Fixed typo in the commit message. Updated also new drm_log.c]
Signed-off-by: Petr Mladek <pmladek@suse.com>

authored by

Marcos Paulo de Souza and committed by
Petr Mladek
242fafe3 63830aef

+7 -7
+1 -1
drivers/gpu/drm/clients/drm_log.c
··· 323 323 { 324 324 struct drm_log *dlog = client_to_drm_log(client); 325 325 326 - console_stop(&dlog->con); 326 + console_suspend(&dlog->con); 327 327 328 328 return 0; 329 329 }
+2 -2
drivers/tty/serial/serial_core.c
··· 2442 2442 } 2443 2443 2444 2444 /* 2445 - * Disable the console device before suspending. 2445 + * Suspend the console device before suspending the port. 2446 2446 */ 2447 2447 if (uart_console(uport)) 2448 - console_stop(uport->cons); 2448 + console_suspend(uport->cons); 2449 2449 2450 2450 uart_change_pm(state, UART_PM_STATE_OFF); 2451 2451
+1 -1
include/linux/console.h
··· 633 633 extern void console_unblank(void); 634 634 extern void console_flush_on_panic(enum con_flush_mode mode); 635 635 extern struct tty_driver *console_device(int *); 636 - extern void console_stop(struct console *); 636 + extern void console_suspend(struct console *); 637 637 extern void console_start(struct console *); 638 638 extern int is_console_locked(void); 639 639 extern int braille_register_console(struct console *, int index,
+3 -3
kernel/printk/printk.c
··· 3497 3497 3498 3498 /* 3499 3499 * Prevent further output on the passed console device so that (for example) 3500 - * serial drivers can disable console output before suspending a port, and can 3500 + * serial drivers can suspend console output before suspending a port, and can 3501 3501 * re-enable output afterwards. 3502 3502 */ 3503 - void console_stop(struct console *console) 3503 + void console_suspend(struct console *console) 3504 3504 { 3505 3505 __pr_flush(console, 1000, true); 3506 3506 console_list_lock(); ··· 3515 3515 */ 3516 3516 synchronize_srcu(&console_srcu); 3517 3517 } 3518 - EXPORT_SYMBOL(console_stop); 3518 + EXPORT_SYMBOL(console_suspend); 3519 3519 3520 3520 void console_start(struct console *console) 3521 3521 {