From 5bc1ea589cad59b88d231c1c48b985c739f93344 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20L=C3=B6pke?= <loepke@edfritsch.de>
Date: Sun, 1 May 2016 14:43:01 +0200
Subject: [PATCH] Removed unnecessary debug output - Fixed ignored GNU-Code
 convention.

---
 20160425/chardev-1write.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/20160425/chardev-1write.c b/20160425/chardev-1write.c
index bd24f06..12cf5bb 100644
--- a/20160425/chardev-1write.c
+++ b/20160425/chardev-1write.c
@@ -27,11 +27,11 @@ static ssize_t device_write(struct file *, const char *, size_t, loff_t *);
  * Global variables are declared as static, so are global within the file. 
  */
 
-static int Major;		/* Major number assigned to our device driver */
-static int Device_Open = 0;	/* Is device open?  
-				 * Used to prevent multiple access to device */
-static char msg[BUF_LEN];	/* The msg the device will give when asked */
-static char *msg_Ptr;		/* The current char from msg we are writing */
+static int Major;	    /* Major number assigned to our device driver */
+static int Device_Open = 0; /* Is device open?  
+			     * Used to prevent multiple access to device */
+static char msg[BUF_LEN];   /* The msg the device will give when asked */
+static char *msg_Ptr;	    /* The current char from msg we are writing */
 
 static char msg_username[USERBUF_LEN]; /* User definable name */
 static int told_you_counter = 0; /* Counts the outputs I've made */
@@ -194,10 +194,10 @@ device_write(struct file *filp, const char *buff, size_t len, loff_t * off)
 		int i;
 		for(i = 0; i < len; i++) //Save the given string
 			msg_username[i] = buff[i];
-		for(i = len; i < USERBUF_LEN; i++) //Zeroing out the rest of mem
+		for(i = len; i < USERBUF_LEN; i++) //Zeroing the rest of mem
 			msg_username[i] = 0;
-		printk(	KERN_INFO "%s: Successfully got %d bytes!\n",
-			DEVICE_NAME, (int)len);
+		//printk(KERN_INFO "%s: Successfully got %d bytes!\n",
+		//       DEVICE_NAME, (int)len);
 		if(msg_username[len-1] == '\n') //Got new line terminator ?
 		  msg_username[len-1] = 0; //Then terminate it!
 		return len; //Emit successfully stored len bytes
-- 
GitLab