From 50a212ec906f7524620675f0c57357691c26c81f Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Wed, 16 Oct 2024 01:20:19 +0000
Subject: [PATCH] 修改GPIO导出默认初始值
---
kernel/arch/um/kernel/kmsg_dump.c | 13 ++-----------
1 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/kernel/arch/um/kernel/kmsg_dump.c b/kernel/arch/um/kernel/kmsg_dump.c
index 1739994..e4abac6 100644
--- a/kernel/arch/um/kernel/kmsg_dump.c
+++ b/kernel/arch/um/kernel/kmsg_dump.c
@@ -1,19 +1,15 @@
// SPDX-License-Identifier: GPL-2.0
#include <linux/kmsg_dump.h>
-#include <linux/spinlock.h>
#include <linux/console.h>
#include <shared/init.h>
#include <shared/kern.h>
#include <os.h>
static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
- enum kmsg_dump_reason reason,
- struct kmsg_dumper_iter *iter)
+ enum kmsg_dump_reason reason)
{
- static DEFINE_SPINLOCK(lock);
static char line[1024];
struct console *con;
- unsigned long flags;
size_t len = 0;
/* only dump kmsg when no console is available */
@@ -28,16 +24,11 @@
if (con)
return;
- if (!spin_trylock_irqsave(&lock, flags))
- return;
-
printf("kmsg_dump:\n");
- while (kmsg_dump_get_line(iter, true, line, sizeof(line), &len)) {
+ while (kmsg_dump_get_line(dumper, true, line, sizeof(line), &len)) {
line[len] = '\0';
printf("%s", line);
}
-
- spin_unlock_irqrestore(&lock, flags);
}
static struct kmsg_dumper kmsg_dumper = {
--
Gitblit v1.6.2