Skip to contentSkip to conversation

isicom: istallion prepare for lock_kernel pushdown

PATCH New Alan Cox 1 participant 1 message Feb 20, 2008 Char and misc drivers

lore
Share & tools
lore

Alan Cox

author
#0 lore raw

PATCH 1/1 isicom: istallion prepare for lock_kernel pushdown

This is an ancient driver so just wrap it in lock_kernel internally and be done.

drivers/char/istallion.c +7 -1
diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.25-rc2-mm1/drivers/char/istallion.c linux-2.6.25-rc2-mm1/drivers/char/istallion.c
@@ -4433,6 +4433,8 @@
 	done = 0;
 	rc = 0;
 
+	lock_kernel();
+	
 	switch (cmd) {
 	case COM_GETPORTSTATS:
 		rc = stli_getportstats(NULL, argp);
@@ -4455,7 +4457,8 @@
 		done++;
 		break;
 	}
-
+	unlock_kernel();
+	
 	if (done)
 		return rc;
 
@@ -4472,6 +4475,8 @@
 	if (brdp->state == 0)
 		return -ENODEV;
 
+	lock_kernel();
+	
 	switch (cmd) {
 	case STL_BINTR:
 		EBRDINTR(brdp);
@@ -4494,6 +4499,7 @@
 		rc = -ENOIOCTLCMD;
 		break;
 	}
+	unlock_kernel();
 	return rc;
 }