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/samples/hw_breakpoint/data_breakpoint.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/kernel/samples/hw_breakpoint/data_breakpoint.c b/kernel/samples/hw_breakpoint/data_breakpoint.c
index 418c46f..b99322f 100644
--- a/kernel/samples/hw_breakpoint/data_breakpoint.c
+++ b/kernel/samples/hw_breakpoint/data_breakpoint.c
@@ -70,7 +70,9 @@
 static void __exit hw_break_module_exit(void)
 {
 	unregister_wide_hw_breakpoint(sample_hbp);
-	symbol_put(ksym_name);
+#ifdef CONFIG_MODULE_UNLOAD
+	__symbol_put(ksym_name);
+#endif
 	printk(KERN_INFO "HW Breakpoint for %s write uninstalled\n", ksym_name);
 }
 

--
Gitblit v1.6.2