aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/interface.c
diff options
context:
space:
mode:
authorHansjoerg Lipp <hjlipp@web.de>2006-04-22 12:43:00 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:40:47 -0400
commit3dda4e373c7474cfe280f4270b70c1563f92a2a7 (patch)
treeb38e2c22056859de773ef8e47b059f53a52d0215 /drivers/isdn/gigaset/interface.c
parent1cdcb6b43fda7424b7435dac8f80b2b5d8a48899 (diff)
[PATCH] i4l gigaset: move sysfs entry to tty class device
Using the class device pointer returned by tty_register_device() with part 1 of the patch, attach the Gigaset drivers' "cidmode" sysfs entry to its tty class device, where it can be found more easily by users who do not know nor care which USB port the device is attached to. Signed-off-by: Hansjoerg Lipp <hjlipp@web.de> Signed-off-by: Tilman Schmidt <tilman@imap.cc> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/isdn/gigaset/interface.c')
-rw-r--r--drivers/isdn/gigaset/interface.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c
index 08e4c4eea14..74fd234956c 100644
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -625,7 +625,14 @@ void gigaset_if_init(struct cardstate *cs)
625 return; 625 return;
626 626
627 tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); 627 tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs);
628 tty_register_device(drv->tty, cs->minor_index, NULL); 628 cs->class = tty_register_device(drv->tty, cs->minor_index, NULL);
629
630 if (!IS_ERR(cs->class))
631 class_set_devdata(cs->class, cs);
632 else {
633 warn("could not register device to the tty subsystem");
634 cs->class = NULL;
635 }
629} 636}
630 637
631void gigaset_if_free(struct cardstate *cs) 638void gigaset_if_free(struct cardstate *cs)
@@ -638,6 +645,7 @@ void gigaset_if_free(struct cardstate *cs)
638 645
639 tasklet_disable(&cs->if_wake_tasklet); 646 tasklet_disable(&cs->if_wake_tasklet);
640 tasklet_kill(&cs->if_wake_tasklet); 647 tasklet_kill(&cs->if_wake_tasklet);
648 cs->class = NULL;
641 tty_unregister_device(drv->tty, cs->minor_index); 649 tty_unregister_device(drv->tty, cs->minor_index);
642} 650}
643 651