From 205f777b328f34f5a06bdaf5325a766601f01677 Mon Sep 17 00:00:00 2001
From: knolax <1339802534.kk@gmail.com>
Date: Fri, 8 Dec 2017 11:29:39 -0500
Subject: added a counter that printks every second, the previous kernel panics
 may have been caused by excessive use of printk.

---
 skey.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/skey.c b/skey.c
index f369c84..e252cec 100644
--- a/skey.c
+++ b/skey.c
@@ -9,7 +9,7 @@
  * defines whether to access the gpios so other parts of the kernel module can
  * be tested on systems w/o the prerequisite GPIOs
  */
-#define USE_GPIO 1
+#define USE_GPIO 0
 /*
  * Unsigned ints containing the BCM pin numbers for the pins used, __initdata
  * helps with the loading and unloading of data in memory
@@ -38,7 +38,14 @@ int skey_update_thread (void *data) {
 	if (!USE_GPIO) {
 		printk(KERN_ALERT "skey: currently in test mode with gpio use disabled\n");
 	}
+	//a counter for testing prints
+	int i = 0;
 	while (1) {
+		i++;
+		i = i % 500;
+		if (!i) {
+			printk(KERN_INFO "skey: update thread printed to kernel log every 1s\n");
+		}
 		if (USE_GPIO) {
 			//reads the keyboard
 			int row_index = 0;
-- 
cgit v1.1