patch-2.3.46 linux/drivers/char/istallion.c
Next file: linux/drivers/char/joystick/joystick.c
Previous file: linux/drivers/char/isicom.c
Back to the patch index
Back to the overall index
- Lines: 53
- Date:
Wed Feb 16 15:42:05 2000
- Orig file:
v2.3.45/linux/drivers/char/istallion.c
- Orig date:
Thu Feb 10 17:11:08 2000
diff -u --recursive --new-file v2.3.45/linux/drivers/char/istallion.c linux/drivers/char/istallion.c
@@ -39,6 +39,7 @@
#include <linux/ioport.h>
#include <linux/delay.h>
#include <linux/init.h>
+#include <linux/devfs_fs_kernel.h>
#include <asm/io.h>
#include <asm/uaccess.h>
@@ -829,12 +830,14 @@
/*****************************************************************************/
+static devfs_handle_t devfs_handle = NULL;
+
void cleanup_module()
{
stlibrd_t *brdp;
stliport_t *portp;
unsigned long flags;
- int i, j;
+ int i, j, k;
#if DEBUG
printk("cleanup_module()\n");
@@ -863,10 +866,10 @@
restore_flags(flags);
return;
}
- if ((i = unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
+ devfs_unregister (devfs_handle);
+ if ((i = devfs_unregister_chrdev(STL_SIOMEMMAJOR, "staliomem")))
printk("STALLION: failed to un-register serial memory device, "
"errno=%d\n", -i);
-
if (stli_tmpwritebuf != (char *) NULL)
kfree_s(stli_tmpwritebuf, STLI_TXBUFSIZE);
if (stli_txcookbuf != (char *) NULL)
@@ -5321,8 +5324,14 @@
* Set up a character driver for the shared memory region. We need this
* to down load the slave code image. Also it is a useful debugging tool.
*/
- if (register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stli_fsiomem))
+ if (devfs_register_chrdev(STL_SIOMEMMAJOR, "staliomem", &stli_fsiomem))
printk("STALLION: failed to register serial memory device\n");
+
+ devfs_handle = devfs_mk_dir (NULL, "staliomem", 9, NULL);
+ devfs_register_series (devfs_handle, "%u", 4, DEVFS_FL_DEFAULT,
+ STL_SIOMEMMAJOR, 0,
+ S_IFCHR | S_IRUSR | S_IWUSR, 0, 0,
+ &stli_fsiomem, NULL);
/*
* Set up the tty driver structure and register us as a driver.
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)