Skip to content

Commit 242fafe

Browse files
marcospspmladek
authored andcommitted
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>
1 parent 63830ae commit 242fafe

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

drivers/gpu/drm/clients/drm_log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ static int drm_log_client_suspend(struct drm_client_dev *client, bool _console_l
323323
{
324324
struct drm_log *dlog = client_to_drm_log(client);
325325

326-
console_stop(&dlog->con);
326+
console_suspend(&dlog->con);
327327

328328
return 0;
329329
}

drivers/tty/serial/serial_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2442,10 +2442,10 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
24422442
}
24432443

24442444
/*
2445-
* Disable the console device before suspending.
2445+
* Suspend the console device before suspending the port.
24462446
*/
24472447
if (uart_console(uport))
2448-
console_stop(uport->cons);
2448+
console_suspend(uport->cons);
24492449

24502450
uart_change_pm(state, UART_PM_STATE_OFF);
24512451

include/linux/console.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ extern void console_conditional_schedule(void);
633633
extern void console_unblank(void);
634634
extern void console_flush_on_panic(enum con_flush_mode mode);
635635
extern struct tty_driver *console_device(int *);
636-
extern void console_stop(struct console *);
636+
extern void console_suspend(struct console *);
637637
extern void console_start(struct console *);
638638
extern int is_console_locked(void);
639639
extern int braille_register_console(struct console *, int index,

kernel/printk/printk.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3497,10 +3497,10 @@ struct tty_driver *console_device(int *index)
34973497

34983498
/*
34993499
* 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
35013501
* re-enable output afterwards.
35023502
*/
3503-
void console_stop(struct console *console)
3503+
void console_suspend(struct console *console)
35043504
{
35053505
__pr_flush(console, 1000, true);
35063506
console_list_lock();
@@ -3515,7 +3515,7 @@ void console_stop(struct console *console)
35153515
*/
35163516
synchronize_srcu(&console_srcu);
35173517
}
3518-
EXPORT_SYMBOL(console_stop);
3518+
EXPORT_SYMBOL(console_suspend);
35193519

35203520
void console_start(struct console *console)
35213521
{

0 commit comments

Comments
 (0)