patch-2.4.0-test4 linux/drivers/sgi/char/streamable.c
Next file: linux/drivers/sgi/char/usema.c
Previous file: linux/drivers/sgi/char/shmiq.c
Back to the patch index
Back to the overall index
- Lines: 48
- Date:
Wed Jul 12 21:58:43 2000
- Orig file:
v2.4.0-test3/linux/drivers/sgi/char/streamable.c
- Orig date:
Mon Jul 10 16:47:24 2000
diff -u --recursive --new-file v2.4.0-test3/linux/drivers/sgi/char/streamable.c linux/drivers/sgi/char/streamable.c
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/kbd_kern.h>
#include <linux/vt_kern.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/shmiq.h>
#include <asm/keyboard.h>
@@ -50,20 +51,6 @@
/* /dev/gfx device */
static int
-sgi_gfx_open (struct inode *inode, struct file *file)
-{
- printk ("GFX: Opened by %d\n", current->pid);
- return 0;
-}
-
-static int
-sgi_gfx_close (struct inode *inode, struct file *file)
-{
- printk ("GFX: Closed by %d\n", current->pid);
- return 0;
-}
-
-static int
sgi_gfx_ioctl (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{
printk ("GFX: ioctl 0x%x %ld called\n", cmd, arg);
@@ -73,8 +60,6 @@
struct file_operations sgi_gfx_fops = {
ioctl: sgi_gfx_ioctl,
- open: sgi_gfx_open,
- release: sgi_gfx_close,
};
static struct miscdevice dev_gfx = {
@@ -236,7 +221,9 @@
static int
sgi_mouse_close (struct inode *inode, struct file *filp)
{
+ lock_kernel();
mouse_opened = 0;
+ unlock_kernel();
return 0;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)