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)
tasklet_disable(&cs->if_wake_tasklet);
tasklet_kill(&cs->if_wake_tasklet);
- cs->class = NULL;
tty_unregister_device(drv->tty, cs->minor_index);
}
* 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;
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;
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