Initial revision
[linux-2.6.git] / drivers / isdn / gigaset / interface.c
index bd2e426..08e4c4e 100644 (file)
@@ -625,14 +625,7 @@ void gigaset_if_init(struct cardstate *cs)
                return;
 
        tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs);
-       cs->class = tty_register_device(drv->tty, cs->minor_index, NULL);
-
-       if (!IS_ERR(cs->class))
-               class_set_devdata(cs->class, cs);
-       else {
-               warn("could not register device to the tty subsystem");
-               cs->class = NULL;
-       }
+       tty_register_device(drv->tty, cs->minor_index, NULL);
 }
 
 void gigaset_if_free(struct cardstate *cs)
@@ -645,7 +638,6 @@ void gigaset_if_free(struct cardstate *cs)
 
        tasklet_disable(&cs->if_wake_tasklet);
        tasklet_kill(&cs->if_wake_tasklet);
-       cs->class = NULL;
        tty_unregister_device(drv->tty, cs->minor_index);
 }
 
@@ -673,9 +665,10 @@ EXPORT_SYMBOL_GPL(gigaset_if_receive);
  *     drv             Driver
  *     procname        Name of the driver (e.g. for /proc/tty/drivers)
  *     devname         Name of the device files (prefix without minor number)
+ *     devfsname       Devfs name of the device files without %d
  */
 void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
-                          const char *devname)
+                          const char *devname, const char *devfsname)
 {
        unsigned minors = drv->minors;
        int ret;
@@ -691,7 +684,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
        tty->major =            GIG_MAJOR,
        tty->type =             TTY_DRIVER_TYPE_SERIAL,
        tty->subtype =          SERIAL_TYPE_NORMAL,
-       tty->flags =            TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV;
+       tty->flags =            TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS,
 
        tty->driver_name =      procname;
        tty->name =             devname;
@@ -699,6 +692,7 @@ void gigaset_if_initdriver(struct gigaset_driver *drv, const char *procname,
        tty->num =              drv->minors;
 
        tty->owner =            THIS_MODULE;
+       tty->devfs_name =       devfsname;
 
        tty->init_termios          = tty_std_termios; //FIXME
        tty->init_termios.c_cflag  = B9600 | CS8 | CREAD | HUPCL | CLOCAL; //FIXME