aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/common.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2009-10-25 05:30:17 -0400
committerDavid S. Miller <davem@davemloft.net>2009-10-29 04:37:12 -0400
commitd9ba9c9125d89e246dc0a0702446528acceb6ddb (patch)
tree9ae300165556afc86d9b54cb915dca0d0d4304da /drivers/isdn/gigaset/common.c
parent2032e2c2309de02cd67b1d26aa701c2a57c4639f (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/common.c')
-rw-r--r--drivers/isdn/gigaset/common.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index 690ac74c82a8..c438cfcb7c6d 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -108,7 +108,7 @@ int gigaset_enterconfigmode(struct cardstate *cs)
108{ 108{
109 int i, r; 109 int i, r;
110 110
111 cs->control_state = TIOCM_RTS; //FIXME 111 cs->control_state = TIOCM_RTS;
112 112
113 r = setflags(cs, TIOCM_DTR, 200); 113 r = setflags(cs, TIOCM_DTR, 200);
114 if (r < 0) 114 if (r < 0)
@@ -132,10 +132,10 @@ int gigaset_enterconfigmode(struct cardstate *cs)
132 132
133error: 133error:
134 dev_err(cs->dev, "error %d on setuartbits\n", -r); 134 dev_err(cs->dev, "error %d on setuartbits\n", -r);
135 cs->control_state = TIOCM_RTS|TIOCM_DTR; // FIXME is this a good value? 135 cs->control_state = TIOCM_RTS|TIOCM_DTR;
136 cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS|TIOCM_DTR); 136 cs->ops->set_modem_ctrl(cs, 0, TIOCM_RTS|TIOCM_DTR);
137 137
138 return -1; //r 138 return -1;
139} 139}
140 140
141static int test_timeout(struct at_state_t *at_state) 141static int test_timeout(struct at_state_t *at_state)
@@ -150,10 +150,9 @@ static int test_timeout(struct at_state_t *at_state)
150 } 150 }
151 151
152 if (!gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL, 152 if (!gigaset_add_event(at_state->cs, at_state, EV_TIMEOUT, NULL,
153 at_state->timer_index, NULL)) { 153 at_state->timer_index, NULL))
154 //FIXME what should we do? 154 dev_err(at_state->cs->dev, "%s: out of memory\n",
155 } 155 __func__);
156
157 return 1; 156 return 1;
158} 157}
159 158
@@ -393,9 +392,8 @@ static void gigaset_freebcs(struct bc_state *bcs)
393 int i; 392 int i;
394 393
395 gig_dbg(DEBUG_INIT, "freeing bcs[%d]->hw", bcs->channel); 394 gig_dbg(DEBUG_INIT, "freeing bcs[%d]->hw", bcs->channel);
396 if (!bcs->cs->ops->freebcshw(bcs)) { 395 if (!bcs->cs->ops->freebcshw(bcs))
397 gig_dbg(DEBUG_INIT, "failed"); 396 gig_dbg(DEBUG_INIT, "failed");
398 }
399 397
400 gig_dbg(DEBUG_INIT, "clearing bcs[%d]->at_state", bcs->channel); 398 gig_dbg(DEBUG_INIT, "clearing bcs[%d]->at_state", bcs->channel);
401 clear_at_state(&bcs->at_state); 399 clear_at_state(&bcs->at_state);
@@ -503,8 +501,6 @@ void gigaset_freecs(struct cardstate *cs)
503 gig_dbg(DEBUG_INIT, "clearing hw"); 501 gig_dbg(DEBUG_INIT, "clearing hw");
504 cs->ops->freecshw(cs); 502 cs->ops->freecshw(cs);
505 503
506 //FIXME cmdbuf
507
508 /* fall through */ 504 /* fall through */
509 case 2: /* error in initcshw */ 505 case 2: /* error in initcshw */
510 /* Deregister from LL */ 506 /* Deregister from LL */
@@ -622,7 +618,7 @@ static struct bc_state *gigaset_initbcs(struct bc_state *bcs,
622{ 618{
623 int i; 619 int i;
624 620
625 bcs->tx_skb = NULL; //FIXME -> hw part 621 bcs->tx_skb = NULL;
626 622
627 skb_queue_head_init(&bcs->squeue); 623 skb_queue_head_init(&bcs->squeue);
628 624
@@ -696,12 +692,13 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
696 int onechannel, int ignoreframes, 692 int onechannel, int ignoreframes,
697 int cidmode, const char *modulename) 693 int cidmode, const char *modulename)
698{ 694{
699 struct cardstate *cs = NULL; 695 struct cardstate *cs;
700 unsigned long flags; 696 unsigned long flags;
701 int i; 697 int i;
702 698
703 gig_dbg(DEBUG_INIT, "allocating cs"); 699 gig_dbg(DEBUG_INIT, "allocating cs");
704 if (!(cs = alloc_cs(drv))) { 700 cs = alloc_cs(drv);
701 if (!cs) {
705 pr_err("maximum number of devices exceeded\n"); 702 pr_err("maximum number of devices exceeded\n");
706 return NULL; 703 return NULL;
707 } 704 }
@@ -931,15 +928,13 @@ int gigaset_start(struct cardstate *cs)
931 cs->ops->baud_rate(cs, B115200); 928 cs->ops->baud_rate(cs, B115200);
932 cs->ops->set_line_ctrl(cs, CS8); 929 cs->ops->set_line_ctrl(cs, CS8);
933 cs->control_state = TIOCM_DTR|TIOCM_RTS; 930 cs->control_state = TIOCM_DTR|TIOCM_RTS;
934 } else {
935 //FIXME use some saved values?
936 } 931 }
937 932
938 cs->waiting = 1; 933 cs->waiting = 1;
939 934
940 if (!gigaset_add_event(cs, &cs->at_state, EV_START, NULL, 0, NULL)) { 935 if (!gigaset_add_event(cs, &cs->at_state, EV_START, NULL, 0, NULL)) {
941 cs->waiting = 0; 936 cs->waiting = 0;
942 //FIXME what should we do? 937 dev_err(cs->dev, "%s: out of memory\n", __func__);
943 goto error; 938 goto error;
944 } 939 }
945 940
@@ -979,7 +974,7 @@ int gigaset_shutdown(struct cardstate *cs)
979 cs->waiting = 1; 974 cs->waiting = 1;
980 975
981 if (!gigaset_add_event(cs, &cs->at_state, EV_SHUTDOWN, NULL, 0, NULL)) { 976 if (!gigaset_add_event(cs, &cs->at_state, EV_SHUTDOWN, NULL, 0, NULL)) {
982 //FIXME what should we do? 977 dev_err(cs->dev, "%s: out of memory\n", __func__);
983 goto exit; 978 goto exit;
984 } 979 }
985 980
@@ -1010,7 +1005,7 @@ void gigaset_stop(struct cardstate *cs)
1010 cs->waiting = 1; 1005 cs->waiting = 1;
1011 1006
1012 if (!gigaset_add_event(cs, &cs->at_state, EV_STOP, NULL, 0, NULL)) { 1007 if (!gigaset_add_event(cs, &cs->at_state, EV_STOP, NULL, 0, NULL)) {
1013 //FIXME what should we do? 1008 dev_err(cs->dev, "%s: out of memory\n", __func__);
1014 goto exit; 1009 goto exit;
1015 } 1010 }
1016 1011