diff options
author | Tilman Schmidt <tilman@imap.cc> | 2009-10-25 05:30:17 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-10-29 04:37:12 -0400 |
commit | d9ba9c9125d89e246dc0a0702446528acceb6ddb (patch) | |
tree | 9ae300165556afc86d9b54cb915dca0d0d4304da /drivers/isdn/gigaset/i4l.c | |
parent | 2032e2c2309de02cd67b1d26aa701c2a57c4639f (diff) |
gigaset: checkpatch cleanup
Dum sanctis checkpatch.pl'ae legibus obsequimur.
Impact: cosmetic
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/isdn/gigaset/i4l.c')
-rw-r--r-- | drivers/isdn/gigaset/i4l.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/drivers/isdn/gigaset/i4l.c b/drivers/isdn/gigaset/i4l.c index 828824f905c4..c129ee47a8fb 100644 --- a/drivers/isdn/gigaset/i4l.c +++ b/drivers/isdn/gigaset/i4l.c | |||
@@ -39,12 +39,12 @@ | |||
39 | static int writebuf_from_LL(int driverID, int channel, int ack, | 39 | static int writebuf_from_LL(int driverID, int channel, int ack, |
40 | struct sk_buff *skb) | 40 | struct sk_buff *skb) |
41 | { | 41 | { |
42 | struct cardstate *cs; | 42 | struct cardstate *cs = gigaset_get_cs_by_id(driverID); |
43 | struct bc_state *bcs; | 43 | struct bc_state *bcs; |
44 | unsigned char *ack_header; | 44 | unsigned char *ack_header; |
45 | unsigned len; | 45 | unsigned len; |
46 | 46 | ||
47 | if (!(cs = gigaset_get_cs_by_id(driverID))) { | 47 | if (!cs) { |
48 | pr_err("%s: invalid driver ID (%d)\n", __func__, driverID); | 48 | pr_err("%s: invalid driver ID (%d)\n", __func__, driverID); |
49 | return -ENODEV; | 49 | return -ENODEV; |
50 | } | 50 | } |
@@ -391,22 +391,19 @@ static int command_from_LL(isdn_ctrl *cntrl) | |||
391 | 391 | ||
392 | break; | 392 | break; |
393 | case ISDN_CMD_PROCEED: | 393 | case ISDN_CMD_PROCEED: |
394 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROCEED"); //FIXME | 394 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROCEED"); |
395 | break; | 395 | break; |
396 | case ISDN_CMD_ALERT: | 396 | case ISDN_CMD_ALERT: |
397 | gig_dbg(DEBUG_ANY, "ISDN_CMD_ALERT"); //FIXME | 397 | gig_dbg(DEBUG_ANY, "ISDN_CMD_ALERT"); |
398 | if (cntrl->arg >= cs->channels) { | 398 | if (cntrl->arg >= cs->channels) { |
399 | dev_err(cs->dev, | 399 | dev_err(cs->dev, |
400 | "ISDN_CMD_ALERT: invalid channel (%d)\n", | 400 | "ISDN_CMD_ALERT: invalid channel (%d)\n", |
401 | (int) cntrl->arg); | 401 | (int) cntrl->arg); |
402 | return -EINVAL; | 402 | return -EINVAL; |
403 | } | 403 | } |
404 | //bcs = cs->bcs + cntrl->arg; | ||
405 | //bcs->proto2 = -1; | ||
406 | // FIXME | ||
407 | break; | 404 | break; |
408 | case ISDN_CMD_REDIR: | 405 | case ISDN_CMD_REDIR: |
409 | gig_dbg(DEBUG_ANY, "ISDN_CMD_REDIR"); //FIXME | 406 | gig_dbg(DEBUG_ANY, "ISDN_CMD_REDIR"); |
410 | break; | 407 | break; |
411 | case ISDN_CMD_PROT_IO: | 408 | case ISDN_CMD_PROT_IO: |
412 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROT_IO"); | 409 | gig_dbg(DEBUG_ANY, "ISDN_CMD_PROT_IO"); |
@@ -486,7 +483,7 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
486 | /* fill ICALL structure */ | 483 | /* fill ICALL structure */ |
487 | response.parm.setup.si1 = 0; /* default: unknown */ | 484 | response.parm.setup.si1 = 0; /* default: unknown */ |
488 | response.parm.setup.si2 = 0; | 485 | response.parm.setup.si2 = 0; |
489 | response.parm.setup.screen = 0; //FIXME how to set these? | 486 | response.parm.setup.screen = 0; |
490 | response.parm.setup.plan = 0; | 487 | response.parm.setup.plan = 0; |
491 | if (!at_state->str_var[STR_ZBC]) { | 488 | if (!at_state->str_var[STR_ZBC]) { |
492 | /* no BC (internal call): assume speech, A-law */ | 489 | /* no BC (internal call): assume speech, A-law */ |
@@ -507,26 +504,24 @@ int gigaset_isdn_icall(struct at_state_t *at_state) | |||
507 | return ICALL_IGNORE; | 504 | return ICALL_IGNORE; |
508 | } | 505 | } |
509 | if (at_state->str_var[STR_NMBR]) { | 506 | if (at_state->str_var[STR_NMBR]) { |
510 | strncpy(response.parm.setup.phone, at_state->str_var[STR_NMBR], | 507 | strlcpy(response.parm.setup.phone, at_state->str_var[STR_NMBR], |
511 | sizeof response.parm.setup.phone - 1); | 508 | sizeof response.parm.setup.phone); |
512 | response.parm.setup.phone[sizeof response.parm.setup.phone - 1] = 0; | ||
513 | } else | 509 | } else |
514 | response.parm.setup.phone[0] = 0; | 510 | response.parm.setup.phone[0] = 0; |
515 | if (at_state->str_var[STR_ZCPN]) { | 511 | if (at_state->str_var[STR_ZCPN]) { |
516 | strncpy(response.parm.setup.eazmsn, at_state->str_var[STR_ZCPN], | 512 | strlcpy(response.parm.setup.eazmsn, at_state->str_var[STR_ZCPN], |
517 | sizeof response.parm.setup.eazmsn - 1); | 513 | sizeof response.parm.setup.eazmsn); |
518 | response.parm.setup.eazmsn[sizeof response.parm.setup.eazmsn - 1] = 0; | ||
519 | } else | 514 | } else |
520 | response.parm.setup.eazmsn[0] = 0; | 515 | response.parm.setup.eazmsn[0] = 0; |
521 | 516 | ||
522 | if (!bcs) { | 517 | if (!bcs) { |
523 | dev_notice(cs->dev, "no channel for incoming call\n"); | 518 | dev_notice(cs->dev, "no channel for incoming call\n"); |
524 | response.command = ISDN_STAT_ICALLW; | 519 | response.command = ISDN_STAT_ICALLW; |
525 | response.arg = 0; //FIXME | 520 | response.arg = 0; |
526 | } else { | 521 | } else { |
527 | gig_dbg(DEBUG_CMD, "Sending ICALL"); | 522 | gig_dbg(DEBUG_CMD, "Sending ICALL"); |
528 | response.command = ISDN_STAT_ICALL; | 523 | response.command = ISDN_STAT_ICALL; |
529 | response.arg = bcs->channel; //FIXME | 524 | response.arg = bcs->channel; |
530 | } | 525 | } |
531 | response.driver = cs->myid; | 526 | response.driver = cs->myid; |
532 | retval = iif->statcallb(&response); | 527 | retval = iif->statcallb(&response); |