patch-2.4.0-test2 linux/drivers/char/nwbutton.c
Next file: linux/drivers/char/nwflash.c
Previous file: linux/drivers/char/nvram.c
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Tue Jun 20 07:37:58 2000
- Orig file:
v2.4.0-test1/linux/drivers/char/nwbutton.c
- Orig date:
Fri May 12 14:18:55 2000
diff -u --recursive --new-file v2.4.0-test1/linux/drivers/char/nwbutton.c linux/drivers/char/nwbutton.c
@@ -172,34 +172,6 @@
? -EFAULT : bcount;
}
-/*
- * This function is called when a user space process attempts to open the
- * device. If the driver is compiled into the kernel it does nothing but
- * succeed, but if it is compiled in as a module it also increments the
- * module usage count to prevent the module from being removed whilst a
- * process has the device open.
- */
-
-static int button_open (struct inode *inode, struct file *filp)
-{
- MOD_INC_USE_COUNT;
- return 0;
-}
-
-/*
- * This function is called when a user space process attempts to close the
- * device. If the driver is compiled into the kernel it does nothing at all,
- * but if it is compiled in as a module it also decrements the module usage
- * count so that it will be possible to unload the module again once all the
- * user processes have closed the device.
- */
-
-static int button_release (struct inode *inode, struct file *filp)
-{
- MOD_DEC_USE_COUNT;
- return 0;
-}
-
/*
* This structure is the file operations structure, which specifies what
* callbacks functions the kernel should call when a user mode process
@@ -207,9 +179,8 @@
*/
static struct file_operations button_fops = {
+ owner: THIS_MODULE,
read: button_read,
- open: button_open,
- release: button_release,
};
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)