diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-07-15 03:32:22 +0000 |
commit | f1da2c3860e301527d56a1ef0b56c649ee7c4b1b (patch) | |
tree | 562b5d2e8b9cb62eb983d78ff6bcf9789e08fcf6 /drivers/char/lp.c | |
parent | 00f11569ac8ca73cbcdef8822de1583e79aee571 (diff) |
Merge with Linux 2.4.0-test5-pre1. This works again on Origin UP.
The IP22 cache bugs which are plaguing some machines are still unfixed.
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c index 5e212af34..a602e3b3b 100644 --- a/drivers/char/lp.c +++ b/drivers/char/lp.c @@ -119,6 +119,7 @@ #include <linux/kernel.h> #include <linux/major.h> #include <linux/sched.h> +#include <linux/smp_lock.h> #include <linux/devfs_fs_kernel.h> #include <linux/malloc.h> #include <linux/fcntl.h> @@ -407,9 +408,11 @@ static int lp_release(struct inode * inode, struct file * file) { unsigned int minor = MINOR(inode->i_rdev); + lock_kernel(); kfree_s(lp_table[minor].lp_buffer, LP_BUFFER_SIZE); lp_table[minor].lp_buffer = NULL; LP_F(minor) &= ~LP_BUSY; + unlock_kernel(); return 0; } |