Skip to content

Commit

Permalink
printk: Rename console_stop to console_suspend
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Marcos Paulo de Souza authored and Petr Mladek committed Mar 11, 2025
1 parent 63830ae commit 242fafe
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/clients/drm_log.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ static int drm_log_client_suspend(struct drm_client_dev *client, bool _console_l
{
struct drm_log *dlog = client_to_drm_log(client);

console_stop(&dlog->con);
console_suspend(&dlog->con);

return 0;
}
Expand Down
4 changes: 2 additions & 2 deletions drivers/tty/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2442,10 +2442,10 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
}

/*
* Disable the console device before suspending.
* Suspend the console device before suspending the port.
*/
if (uart_console(uport))
console_stop(uport->cons);
console_suspend(uport->cons);

uart_change_pm(state, UART_PM_STATE_OFF);

Expand Down
2 changes: 1 addition & 1 deletion include/linux/console.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,7 @@ extern void console_conditional_schedule(void);
extern void console_unblank(void);
extern void console_flush_on_panic(enum con_flush_mode mode);
extern struct tty_driver *console_device(int *);
extern void console_stop(struct console *);
extern void console_suspend(struct console *);
extern void console_start(struct console *);
extern int is_console_locked(void);
extern int braille_register_console(struct console *, int index,
Expand Down
6 changes: 3 additions & 3 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -3497,10 +3497,10 @@ struct tty_driver *console_device(int *index)

/*
* Prevent further output on the passed console device so that (for example)
* serial drivers can disable console output before suspending a port, and can
* serial drivers can suspend console output before suspending a port, and can
* re-enable output afterwards.
*/
void console_stop(struct console *console)
void console_suspend(struct console *console)
{
__pr_flush(console, 1000, true);
console_list_lock();
Expand All @@ -3515,7 +3515,7 @@ void console_stop(struct console *console)
*/
synchronize_srcu(&console_srcu);
}
EXPORT_SYMBOL(console_stop);
EXPORT_SYMBOL(console_suspend);

void console_start(struct console *console)
{
Expand Down

0 comments on commit 242fafe

Please sign in to comment.