Skip to content

Commit

Permalink
isicom: istallion prepare for lock_kernel pushdown
Browse files Browse the repository at this point in the history
This is an ancient driver so just wrap it in lock_kernel internally and
be done.

Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alan-Cox authored and torvalds committed Apr 30, 2008
1 parent 1eac494 commit 3736113
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/char/istallion.c
Original file line number Diff line number Diff line change
Expand Up @@ -4433,6 +4433,8 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un
done = 0;
rc = 0;

lock_kernel();

switch (cmd) {
case COM_GETPORTSTATS:
rc = stli_getportstats(NULL, argp);
Expand All @@ -4455,6 +4457,7 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un
done++;
break;
}
unlock_kernel();

if (done)
return rc;
Expand All @@ -4472,6 +4475,8 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un
if (brdp->state == 0)
return -ENODEV;

lock_kernel();

switch (cmd) {
case STL_BINTR:
EBRDINTR(brdp);
Expand All @@ -4494,6 +4499,7 @@ static int stli_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, un
rc = -ENOIOCTLCMD;
break;
}
unlock_kernel();
return rc;
}

Expand Down

0 comments on commit 3736113

Please sign in to comment.