aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r--drivers/isdn/gigaset/common.c17
-rw-r--r--drivers/isdn/gigaset/gigaset.h1
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index d00acddd6213..68db361e766e 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -1037,16 +1037,8 @@ void gigaset_debugdrivers(void)
1037 } 1037 }
1038 spin_unlock_irqrestore(&driver_lock, flags); 1038 spin_unlock_irqrestore(&driver_lock, flags);
1039} 1039}
1040EXPORT_SYMBOL_GPL(gigaset_debugdrivers);
1041 1040
1042struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty) 1041static struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
1043{
1044 if (tty->index < 0 || tty->index >= tty->driver->num)
1045 return NULL;
1046 return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
1047}
1048
1049struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
1050{ 1042{
1051 unsigned long flags; 1043 unsigned long flags;
1052 static struct cardstate *ret = NULL; 1044 static struct cardstate *ret = NULL;
@@ -1069,6 +1061,13 @@ struct cardstate *gigaset_get_cs_by_minor(unsigned minor)
1069 return ret; 1061 return ret;
1070} 1062}
1071 1063
1064struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty)
1065{
1066 if (tty->index < 0 || tty->index >= tty->driver->num)
1067 return NULL;
1068 return gigaset_get_cs_by_minor(tty->index + tty->driver->minor_start);
1069}
1070
1072void gigaset_freedriver(struct gigaset_driver *drv) 1071void gigaset_freedriver(struct gigaset_driver *drv)
1073{ 1072{
1074 unsigned long flags; 1073 unsigned long flags;
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h
index 350dfcf15e6c..9d21ba8757b0 100644
--- a/drivers/isdn/gigaset/gigaset.h
+++ b/drivers/isdn/gigaset/gigaset.h
@@ -776,7 +776,6 @@ struct gigaset_driver *gigaset_initdriver(unsigned minor, unsigned minors,
776/* Deallocate driver structure. */ 776/* Deallocate driver structure. */
777void gigaset_freedriver(struct gigaset_driver *drv); 777void gigaset_freedriver(struct gigaset_driver *drv);
778void gigaset_debugdrivers(void); 778void gigaset_debugdrivers(void);
779struct cardstate *gigaset_get_cs_by_minor(unsigned minor);
780struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty); 779struct cardstate *gigaset_get_cs_by_tty(struct tty_struct *tty);
781struct cardstate *gigaset_get_cs_by_id(int id); 780struct cardstate *gigaset_get_cs_by_id(int id);
782 781