diff options
Diffstat (limited to 'drivers/isdn')
-rw-r--r-- | drivers/isdn/gigaset/asyncdata.c | 2 | ||||
-rw-r--r-- | drivers/isdn/gigaset/bas-gigaset.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/common.c | 106 | ||||
-rw-r--r-- | drivers/isdn/gigaset/ev-layer.c | 2 | ||||
-rw-r--r-- | drivers/isdn/gigaset/gigaset.h | 2 | ||||
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 6 | ||||
-rw-r--r-- | drivers/isdn/gigaset/proc.c | 2 | ||||
-rw-r--r-- | drivers/isdn/gigaset/usb-gigaset.c | 7 |
8 files changed, 60 insertions, 71 deletions
diff --git a/drivers/isdn/gigaset/asyncdata.c b/drivers/isdn/gigaset/asyncdata.c index 2d2a6b6b83ff..ce60f6521b96 100644 --- a/drivers/isdn/gigaset/asyncdata.c +++ b/drivers/isdn/gigaset/asyncdata.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2005 by Tilman Schmidt <tilman@imap.cc>, | 4 | * Copyright (c) 2005 by Tilman Schmidt <tilman@imap.cc>, |
5 | * Hansjoerg Lipp <hjlipp@web.de>, | 5 | * Hansjoerg Lipp <hjlipp@web.de>, |
6 | * Stefan Eilers <Eilers.Stefan@epost.de>. | 6 | * Stefan Eilers. |
7 | * | 7 | * |
8 | * ===================================================================== | 8 | * ===================================================================== |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
diff --git a/drivers/isdn/gigaset/bas-gigaset.c b/drivers/isdn/gigaset/bas-gigaset.c index 8cfd51863136..fa37db68c962 100644 --- a/drivers/isdn/gigaset/bas-gigaset.c +++ b/drivers/isdn/gigaset/bas-gigaset.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Hansjoerg Lipp <hjlipp@web.de>, | 4 | * Copyright (c) 2001 by Hansjoerg Lipp <hjlipp@web.de>, |
5 | * Tilman Schmidt <tilman@imap.cc>, | 5 | * Tilman Schmidt <tilman@imap.cc>, |
6 | * Stefan Eilers <Eilers.Stefan@epost.de>. | 6 | * Stefan Eilers. |
7 | * | 7 | * |
8 | * Based on usb-gigaset.c. | 8 | * Based on usb-gigaset.c. |
9 | * | 9 | * |
@@ -26,7 +26,7 @@ | |||
26 | #include <linux/moduleparam.h> | 26 | #include <linux/moduleparam.h> |
27 | 27 | ||
28 | /* Version Information */ | 28 | /* Version Information */ |
29 | #define DRIVER_AUTHOR "Tilman Schmidt <tilman@imap.cc>, Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers <Eilers.Stefan@epost.de>" | 29 | #define DRIVER_AUTHOR "Tilman Schmidt <tilman@imap.cc>, Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers" |
30 | #define DRIVER_DESC "USB Driver for Gigaset 307x" | 30 | #define DRIVER_DESC "USB Driver for Gigaset 307x" |
31 | 31 | ||
32 | 32 | ||
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index c3c9804796cd..f8e5759c636c 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stuff used by all variants of the driver | 2 | * Stuff used by all variants of the driver |
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, | 4 | * Copyright (c) 2001 by Stefan Eilers, |
5 | * Hansjoerg Lipp <hjlipp@web.de>, | 5 | * Hansjoerg Lipp <hjlipp@web.de>, |
6 | * Tilman Schmidt <tilman@imap.cc>. | 6 | * Tilman Schmidt <tilman@imap.cc>. |
7 | * | 7 | * |
@@ -19,7 +19,7 @@ | |||
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | 20 | ||
21 | /* Version Information */ | 21 | /* Version Information */ |
22 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers <Eilers.Stefan@epost.de>" | 22 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Tilman Schmidt <tilman@imap.cc>, Stefan Eilers" |
23 | #define DRIVER_DESC "Driver for Gigaset 307x" | 23 | #define DRIVER_DESC "Driver for Gigaset 307x" |
24 | 24 | ||
25 | /* Module parameters */ | 25 | /* Module parameters */ |
@@ -28,15 +28,7 @@ EXPORT_SYMBOL_GPL(gigaset_debuglevel); | |||
28 | module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR); | 28 | module_param_named(debug, gigaset_debuglevel, int, S_IRUGO|S_IWUSR); |
29 | MODULE_PARM_DESC(debug, "debug level"); | 29 | MODULE_PARM_DESC(debug, "debug level"); |
30 | 30 | ||
31 | /*====================================================================== | 31 | /* driver state flags */ |
32 | Prototypes of internal functions | ||
33 | */ | ||
34 | |||
35 | static struct cardstate *alloc_cs(struct gigaset_driver *drv); | ||
36 | static void free_cs(struct cardstate *cs); | ||
37 | static void make_valid(struct cardstate *cs, unsigned mask); | ||
38 | static void make_invalid(struct cardstate *cs, unsigned mask); | ||
39 | |||
40 | #define VALID_MINOR 0x01 | 32 | #define VALID_MINOR 0x01 |
41 | #define VALID_ID 0x02 | 33 | #define VALID_ID 0x02 |
42 | #define ASSIGNED 0x04 | 34 | #define ASSIGNED 0x04 |
@@ -400,6 +392,52 @@ static void gigaset_freebcs(struct bc_state *bcs) | |||
400 | } | 392 | } |
401 | } | 393 | } |
402 | 394 | ||
395 | static struct cardstate *alloc_cs(struct gigaset_driver *drv) | ||
396 | { | ||
397 | unsigned long flags; | ||
398 | unsigned i; | ||
399 | static struct cardstate *ret = NULL; | ||
400 | |||
401 | spin_lock_irqsave(&drv->lock, flags); | ||
402 | for (i = 0; i < drv->minors; ++i) { | ||
403 | if (!(drv->flags[i] & VALID_MINOR)) { | ||
404 | drv->flags[i] = VALID_MINOR; | ||
405 | ret = drv->cs + i; | ||
406 | } | ||
407 | if (ret) | ||
408 | break; | ||
409 | } | ||
410 | spin_unlock_irqrestore(&drv->lock, flags); | ||
411 | return ret; | ||
412 | } | ||
413 | |||
414 | static void free_cs(struct cardstate *cs) | ||
415 | { | ||
416 | unsigned long flags; | ||
417 | struct gigaset_driver *drv = cs->driver; | ||
418 | spin_lock_irqsave(&drv->lock, flags); | ||
419 | drv->flags[cs->minor_index] = 0; | ||
420 | spin_unlock_irqrestore(&drv->lock, flags); | ||
421 | } | ||
422 | |||
423 | static void make_valid(struct cardstate *cs, unsigned mask) | ||
424 | { | ||
425 | unsigned long flags; | ||
426 | struct gigaset_driver *drv = cs->driver; | ||
427 | spin_lock_irqsave(&drv->lock, flags); | ||
428 | drv->flags[cs->minor_index] |= mask; | ||
429 | spin_unlock_irqrestore(&drv->lock, flags); | ||
430 | } | ||
431 | |||
432 | static void make_invalid(struct cardstate *cs, unsigned mask) | ||
433 | { | ||
434 | unsigned long flags; | ||
435 | struct gigaset_driver *drv = cs->driver; | ||
436 | spin_lock_irqsave(&drv->lock, flags); | ||
437 | drv->flags[cs->minor_index] &= ~mask; | ||
438 | spin_unlock_irqrestore(&drv->lock, flags); | ||
439 | } | ||
440 | |||
403 | void gigaset_freecs(struct cardstate *cs) | 441 | void gigaset_freecs(struct cardstate *cs) |
404 | { | 442 | { |
405 | int i; | 443 | int i; |
@@ -1117,52 +1155,6 @@ out1: | |||
1117 | } | 1155 | } |
1118 | EXPORT_SYMBOL_GPL(gigaset_initdriver); | 1156 | EXPORT_SYMBOL_GPL(gigaset_initdriver); |
1119 | 1157 | ||
1120 | static struct cardstate *alloc_cs(struct gigaset_driver *drv) | ||
1121 | { | ||
1122 | unsigned long flags; | ||
1123 | unsigned i; | ||
1124 | static struct cardstate *ret = NULL; | ||
1125 | |||
1126 | spin_lock_irqsave(&drv->lock, flags); | ||
1127 | for (i = 0; i < drv->minors; ++i) { | ||
1128 | if (!(drv->flags[i] & VALID_MINOR)) { | ||
1129 | drv->flags[i] = VALID_MINOR; | ||
1130 | ret = drv->cs + i; | ||
1131 | } | ||
1132 | if (ret) | ||
1133 | break; | ||
1134 | } | ||
1135 | spin_unlock_irqrestore(&drv->lock, flags); | ||
1136 | return ret; | ||
1137 | } | ||
1138 | |||
1139 | static void free_cs(struct cardstate *cs) | ||
1140 | { | ||
1141 | unsigned long flags; | ||
1142 | struct gigaset_driver *drv = cs->driver; | ||
1143 | spin_lock_irqsave(&drv->lock, flags); | ||
1144 | drv->flags[cs->minor_index] = 0; | ||
1145 | spin_unlock_irqrestore(&drv->lock, flags); | ||
1146 | } | ||
1147 | |||
1148 | static void make_valid(struct cardstate *cs, unsigned mask) | ||
1149 | { | ||
1150 | unsigned long flags; | ||
1151 | struct gigaset_driver *drv = cs->driver; | ||
1152 | spin_lock_irqsave(&drv->lock, flags); | ||
1153 | drv->flags[cs->minor_index] |= mask; | ||
1154 | spin_unlock_irqrestore(&drv->lock, flags); | ||
1155 | } | ||
1156 | |||
1157 | static void make_invalid(struct cardstate *cs, unsigned mask) | ||
1158 | { | ||
1159 | unsigned long flags; | ||
1160 | struct gigaset_driver *drv = cs->driver; | ||
1161 | spin_lock_irqsave(&drv->lock, flags); | ||
1162 | drv->flags[cs->minor_index] &= ~mask; | ||
1163 | spin_unlock_irqrestore(&drv->lock, flags); | ||
1164 | } | ||
1165 | |||
1166 | /* For drivers without fixed assignment device<->cardstate (usb) */ | 1158 | /* For drivers without fixed assignment device<->cardstate (usb) */ |
1167 | struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv) | 1159 | struct cardstate *gigaset_getunassignedcs(struct gigaset_driver *drv) |
1168 | { | 1160 | { |
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c index 0bf6a283a5a6..2e826d051c85 100644 --- a/drivers/isdn/gigaset/ev-layer.c +++ b/drivers/isdn/gigaset/ev-layer.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stuff used by all variants of the driver | 2 | * Stuff used by all variants of the driver |
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, | 4 | * Copyright (c) 2001 by Stefan Eilers, |
5 | * Hansjoerg Lipp <hjlipp@web.de>, | 5 | * Hansjoerg Lipp <hjlipp@web.de>, |
6 | * Tilman Schmidt <tilman@imap.cc>. | 6 | * Tilman Schmidt <tilman@imap.cc>. |
7 | * | 7 | * |
diff --git a/drivers/isdn/gigaset/gigaset.h b/drivers/isdn/gigaset/gigaset.h index 3596096ca073..39a883ebc696 100644 --- a/drivers/isdn/gigaset/gigaset.h +++ b/drivers/isdn/gigaset/gigaset.h | |||
@@ -2,7 +2,7 @@ | |||
2 | * Siemens Gigaset 307x driver | 2 | * Siemens Gigaset 307x driver |
3 | * Common header file for all connection variants | 3 | * Common header file for all connection variants |
4 | * | 4 | * |
5 | * Written by Stefan Eilers <Eilers.Stefan@epost.de> | 5 | * Written by Stefan Eilers |
6 | * and Hansjoerg Lipp <hjlipp@web.de> | 6 | * and Hansjoerg Lipp <hjlipp@web.de> |
7 | * | 7 | * |
8 | * ===================================================================== | 8 | * ===================================================================== |
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index cc1d3093e433..7059b84b96a7 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -1,9 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * Stuff used by all variants of the driver | 2 | * Stuff used by all variants of the driver |
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Stefan Eilers (Eilers.Stefan@epost.de), | 4 | * Copyright (c) 2001 by Stefan Eilers, |
5 | * Hansjoerg Lipp (hjlipp@web.de), | 5 | * Hansjoerg Lipp <hjlipp@web.de>, |
6 | * Tilman Schmidt (tilman@imap.cc). | 6 | * Tilman Schmidt <tilman@imap.cc>. |
7 | * | 7 | * |
8 | * ===================================================================== | 8 | * ===================================================================== |
9 | * This program is free software; you can redistribute it and/or | 9 | * This program is free software; you can redistribute it and/or |
diff --git a/drivers/isdn/gigaset/proc.c b/drivers/isdn/gigaset/proc.c index 8f124e8e604b..80d8ef1874f3 100644 --- a/drivers/isdn/gigaset/proc.c +++ b/drivers/isdn/gigaset/proc.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Stuff used by all variants of the driver | 2 | * Stuff used by all variants of the driver |
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de>, | 4 | * Copyright (c) 2001 by Stefan Eilers, |
5 | * Hansjoerg Lipp <hjlipp@web.de>, | 5 | * Hansjoerg Lipp <hjlipp@web.de>, |
6 | * Tilman Schmidt <tilman@imap.cc>. | 6 | * Tilman Schmidt <tilman@imap.cc>. |
7 | * | 7 | * |
diff --git a/drivers/isdn/gigaset/usb-gigaset.c b/drivers/isdn/gigaset/usb-gigaset.c index 6ae5df5f2b6a..fe8435b8fa97 100644 --- a/drivers/isdn/gigaset/usb-gigaset.c +++ b/drivers/isdn/gigaset/usb-gigaset.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * USB driver for Gigaset 307x directly or using M105 Data. | 2 | * USB driver for Gigaset 307x directly or using M105 Data. |
3 | * | 3 | * |
4 | * Copyright (c) 2001 by Stefan Eilers <Eilers.Stefan@epost.de> | 4 | * Copyright (c) 2001 by Stefan Eilers |
5 | * and Hansjoerg Lipp <hjlipp@web.de>. | 5 | * and Hansjoerg Lipp <hjlipp@web.de>. |
6 | * | 6 | * |
7 | * This driver was derived from the USB skeleton driver by | 7 | * This driver was derived from the USB skeleton driver by |
@@ -25,7 +25,7 @@ | |||
25 | #include <linux/moduleparam.h> | 25 | #include <linux/moduleparam.h> |
26 | 26 | ||
27 | /* Version Information */ | 27 | /* Version Information */ |
28 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers <Eilers.Stefan@epost.de>" | 28 | #define DRIVER_AUTHOR "Hansjoerg Lipp <hjlipp@web.de>, Stefan Eilers" |
29 | #define DRIVER_DESC "USB Driver for Gigaset 307x using M105" | 29 | #define DRIVER_DESC "USB Driver for Gigaset 307x using M105" |
30 | 30 | ||
31 | /* Module parameters */ | 31 | /* Module parameters */ |
@@ -816,9 +816,6 @@ error: | |||
816 | return retval; | 816 | return retval; |
817 | } | 817 | } |
818 | 818 | ||
819 | /** | ||
820 | * skel_disconnect | ||
821 | */ | ||
822 | static void gigaset_disconnect(struct usb_interface *interface) | 819 | static void gigaset_disconnect(struct usb_interface *interface) |
823 | { | 820 | { |
824 | struct cardstate *cs; | 821 | struct cardstate *cs; |