Driver core: convert tty core to use struct device
Converts from using struct "class_device" to "struct device" making everything show up properly in /sys/devices/ with symlinks from the /sys/class directory. Also fixes up the isdn drivers that were putting something in the class device's directory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -625,13 +625,13 @@ 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);
|
||||
cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL);
|
||||
|
||||
if (!IS_ERR(cs->class))
|
||||
class_set_devdata(cs->class, cs);
|
||||
if (!IS_ERR(cs->tty_dev))
|
||||
dev_set_drvdata(cs->tty_dev, cs);
|
||||
else {
|
||||
warn("could not register device to the tty subsystem");
|
||||
cs->class = NULL;
|
||||
cs->tty_dev = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,7 +645,7 @@ void gigaset_if_free(struct cardstate *cs)
|
||||
|
||||
tasklet_disable(&cs->if_wake_tasklet);
|
||||
tasklet_kill(&cs->if_wake_tasklet);
|
||||
cs->class = NULL;
|
||||
cs->tty_dev = NULL;
|
||||
tty_unregister_device(drv->tty, cs->minor_index);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user