diff mbox series

tty/sysrq: make sysrq_replay_logs_op const

Message ID tencent_E7CD9DB87A448073E350F9400678ED9F9C0A@qq.com
State New
Headers show
Series tty/sysrq: make sysrq_replay_logs_op const | expand

Commit Message

xiaopeitux@foxmail.com April 3, 2025, 8:38 a.m. UTC
From: Pei Xiao <xiaopei01@kylinos.cn>

Mark sysrq_replay_logs_op as const, preventing accidental modification.

Signed-off-by: Pei Xiao <xiaopei01@kylinos.cn>
---
 drivers/tty/sysrq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/tty/sysrq.c b/drivers/tty/sysrq.c
index f85ce02e4725..e9ada1c14e26 100644
--- a/drivers/tty/sysrq.c
+++ b/drivers/tty/sysrq.c
@@ -454,7 +454,7 @@  static void sysrq_handle_replay_logs(u8 key)
 {
 	console_try_replay_all();
 }
-static struct sysrq_key_op sysrq_replay_logs_op = {
+static const struct sysrq_key_op sysrq_replay_logs_op = {
 	.handler        = sysrq_handle_replay_logs,
 	.help_msg       = "replay-kernel-logs(R)",
 	.action_msg     = "Replay kernel logs on consoles",