aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2006-06-26 03:25:34 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:23 -0400
commit698e3ed9d4f47286134f66ea333b6679b29e59e4 (patch)
tree07d9fd5666d7bff48ba4520abbb2bc78b7160558 /drivers/isdn/gigaset
parent06163f86349f0b39948a86d21b2db0d53e47fd8c (diff)
[PATCH] isdn4linux: Gigaset driver cleanup
The following patch to the common part of the Siemens Gigaset driver prevents it from trying to send the +++ break sequence if the device has been disconnected, and removes a couple of assignments which didn't have any effect. Signed-off-by: Tilman Schmidt <tilman@imap.cc> Acked-by: Hansjoerg Lipp <hjlipp@web.de> Cc: Karsten Keil <kkeil@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/isdn/gigaset')
-rw-r--r--drivers/isdn/gigaset/ev-layer.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/isdn/gigaset/ev-layer.c b/drivers/isdn/gigaset/ev-layer.c
index 18e05c09b71c..44f02dbd1111 100644
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -1262,7 +1262,8 @@ static void do_action(int action, struct cardstate *cs,
1262 break; 1262 break;
1263 case ACT_HUPMODEM: 1263 case ACT_HUPMODEM:
1264 /* send "+++" (hangup in unimodem mode) */ 1264 /* send "+++" (hangup in unimodem mode) */
1265 cs->ops->write_cmd(cs, "+++", 3, NULL); 1265 if (cs->connected)
1266 cs->ops->write_cmd(cs, "+++", 3, NULL);
1266 break; 1267 break;
1267 case ACT_RING: 1268 case ACT_RING:
1268 /* get fresh AT state structure for new CID */ 1269 /* get fresh AT state structure for new CID */
@@ -1294,7 +1295,6 @@ static void do_action(int action, struct cardstate *cs,
1294 break; 1295 break;
1295 case ACT_ICALL: 1296 case ACT_ICALL:
1296 handle_icall(cs, bcs, p_at_state); 1297 handle_icall(cs, bcs, p_at_state);
1297 at_state = *p_at_state;
1298 break; 1298 break;
1299 case ACT_FAILSDOWN: 1299 case ACT_FAILSDOWN:
1300 dev_warn(cs->dev, "Could not shut down the device.\n"); 1300 dev_warn(cs->dev, "Could not shut down the device.\n");
@@ -1334,10 +1334,8 @@ static void do_action(int action, struct cardstate *cs,
1334 */ 1334 */
1335 at_state->pending_commands |= PC_DLE0; 1335 at_state->pending_commands |= PC_DLE0;
1336 atomic_set(&cs->commands_pending, 1); 1336 atomic_set(&cs->commands_pending, 1);
1337 } else { 1337 } else
1338 disconnect(p_at_state); 1338 disconnect(p_at_state);
1339 at_state = *p_at_state;
1340 }
1341 break; 1339 break;
1342 case ACT_FAKEDLE0: 1340 case ACT_FAKEDLE0:
1343 at_state->int_var[VAR_ZDLE] = 0; 1341 at_state->int_var[VAR_ZDLE] = 0;
@@ -1354,10 +1352,8 @@ static void do_action(int action, struct cardstate *cs,
1354 at_state->cid = -1; 1352 at_state->cid = -1;
1355 if (bcs && cs->onechannel) 1353 if (bcs && cs->onechannel)
1356 at_state->pending_commands |= PC_DLE0; 1354 at_state->pending_commands |= PC_DLE0;
1357 else { 1355 else
1358 disconnect(p_at_state); 1356 disconnect(p_at_state);
1359 at_state = *p_at_state;
1360 }
1361 schedule_init(cs, MS_RECOVER); 1357 schedule_init(cs, MS_RECOVER);
1362 break; 1358 break;
1363 case ACT_FAILDLE0: 1359 case ACT_FAILDLE0:
@@ -1410,7 +1406,6 @@ static void do_action(int action, struct cardstate *cs,
1410 1406
1411 case ACT_ABORTACCEPT: /* hangup/error/timeout during ICALL processing */ 1407 case ACT_ABORTACCEPT: /* hangup/error/timeout during ICALL processing */
1412 disconnect(p_at_state); 1408 disconnect(p_at_state);
1413 at_state = *p_at_state;
1414 break; 1409 break;
1415 1410
1416 case ACT_ABORTDIAL: /* error/timeout during dial preparation */ 1411 case ACT_ABORTDIAL: /* error/timeout during dial preparation */