diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-02-24 00:12:35 +0000 |
commit | 482368b1a8e45430672c58c9a42e7d2004367126 (patch) | |
tree | ce2a1a567d4d62dee7c2e71a46a99cf72cf1d606 /drivers/char/dsp56k.c | |
parent | e4d0251c6f56ab2e191afb70f80f382793e23f74 (diff) |
Merge with 2.3.47. Guys, this is buggy as shit. You've been warned.
Diffstat (limited to 'drivers/char/dsp56k.c')
-rw-r--r-- | drivers/char/dsp56k.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/char/dsp56k.c b/drivers/char/dsp56k.c index ff41c0fdd..8ed17fd71 100644 --- a/drivers/char/dsp56k.c +++ b/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 @@ static struct file_operations dsp56k_fops = { /****** 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 @@ int __init dsp56k_init(void) 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 @@ int init_module(void) void cleanup_module(void) { - unregister_chrdev(DSP56K_MAJOR, "dsp56k"); + devfs_unregister_chrdev(DSP56K_MAJOR, "dsp56k"); + devfs_unregister (devfs_handle); } #endif /* MODULE */ |