summaryrefslogtreecommitdiff
path: root/skey.c
diff options
context:
space:
mode:
authorknolax <1339802534.kk@gmail.com>2017-12-08 11:29:39 -0500
committerknolax <1339802534.kk@gmail.com>2017-12-08 11:29:39 -0500
commit205f777b328f34f5a06bdaf5325a766601f01677 (patch)
tree138ed5a4a5e7f722d087f69dbf590a2167b7302a /skey.c
parent3fd28fd880ad8026b041a66e536387e85780f2cb (diff)
added a counter that printks every second, the previous kernel panics may have been caused by excessive use of printk.
Diffstat (limited to 'skey.c')
-rw-r--r--skey.c9
1 files changed, 8 insertions, 1 deletions
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;