patch-2.3.46 linux/drivers/char/dsp56k.c
Next file: linux/drivers/char/dtlk.c
Previous file: linux/drivers/char/console.c
Back to the patch index
Back to the overall index
- Lines: 43
- Date:
Wed Feb 16 15:42:05 2000
- Orig file:
v2.3.45/linux/drivers/char/dsp56k.c
- Orig date:
Thu Feb 10 17:11:07 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/char/dsp56k.c linux/drivers/char/dsp56k.c
@@ -34,6 +34,7 @@
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/init.h>
+#include <linux/devfs_fs_kernel.h>
#include <asm/segment.h>
#include <asm/atarihw.h>
@@ -510,6 +511,9 @@
/****** Init and module functions ******/
+
+static devfs_handle_t devfs_handle = NULL;
+
int __init dsp56k_init(void)
{
if(!MACH_IS_ATARI || !ATARIHW_PRESENT(DSP56K)) {
@@ -517,10 +521,14 @@
return -ENODEV;
}
- if(register_chrdev(DSP56K_MAJOR, "dsp56k", &dsp56k_fops)) {
+ if(devfs_register_chrdev(DSP56K_MAJOR, "dsp56k", &dsp56k_fops)) {
printk("DSP56k driver: Unable to register driver\n");
return -ENODEV;
}
+ devfs_handle = devfs_register (NULL, "dsp56k", 0, DEVFS_FL_NONE,
+ DSP56K_MAJOR, 0,
+ S_IFCHR | S_IRUSR | S_IWUSR, 0, 0,
+ &dsp56k_fops, NULL);
dsp56k.in_use = 0;
@@ -537,6 +545,7 @@
void cleanup_module(void)
{
- unregister_chrdev(DSP56K_MAJOR, "dsp56k");
+ devfs_unregister_chrdev(DSP56K_MAJOR, "dsp56k");
+ devfs_unregister (devfs_handle);
}
#endif /* MODULE */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)