aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/gigaset/common.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/gigaset/common.c')
-rw-r--r--drivers/isdn/gigaset/common.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c
index acd417197d03..f8f7d7e553bf 100644
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -501,11 +501,11 @@ static void gigaset_inbuf_init(struct inbuf_t *inbuf, struct bc_state *bcs,
501 struct cardstate *cs, int inputstate) 501 struct cardstate *cs, int inputstate)
502/* inbuf->read must be allocated before! */ 502/* inbuf->read must be allocated before! */
503{ 503{
504 atomic_set(&inbuf->head, 0); 504 inbuf->head = 0;
505 atomic_set(&inbuf->tail, 0); 505 inbuf->tail = 0;
506 inbuf->cs = cs; 506 inbuf->cs = cs;
507 inbuf->bcs = bcs; /*base driver: NULL*/ 507 inbuf->bcs = bcs; /*base driver: NULL*/
508 inbuf->rcvbuf = NULL; //FIXME 508 inbuf->rcvbuf = NULL;
509 inbuf->inputstate = inputstate; 509 inbuf->inputstate = inputstate;
510} 510}
511 511
@@ -521,8 +521,8 @@ int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src,
521 return 0; 521 return 0;
522 522
523 bytesleft = numbytes; 523 bytesleft = numbytes;
524 tail = atomic_read(&inbuf->tail); 524 tail = inbuf->tail;
525 head = atomic_read(&inbuf->head); 525 head = inbuf->head;
526 gig_dbg(DEBUG_INTR, "buffer state: %u -> %u", head, tail); 526 gig_dbg(DEBUG_INTR, "buffer state: %u -> %u", head, tail);
527 527
528 while (bytesleft) { 528 while (bytesleft) {
@@ -546,7 +546,7 @@ int gigaset_fill_inbuf(struct inbuf_t *inbuf, const unsigned char *src,
546 src += n; 546 src += n;
547 } 547 }
548 gig_dbg(DEBUG_INTR, "setting tail to %u", tail); 548 gig_dbg(DEBUG_INTR, "setting tail to %u", tail);
549 atomic_set(&inbuf->tail, tail); 549 inbuf->tail = tail;
550 return numbytes != bytesleft; 550 return numbytes != bytesleft;
551} 551}
552EXPORT_SYMBOL_GPL(gigaset_fill_inbuf); 552EXPORT_SYMBOL_GPL(gigaset_fill_inbuf);
@@ -668,7 +668,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
668 668
669 tasklet_init(&cs->event_tasklet, &gigaset_handle_event, 669 tasklet_init(&cs->event_tasklet, &gigaset_handle_event,
670 (unsigned long) cs); 670 (unsigned long) cs);
671 atomic_set(&cs->commands_pending, 0); 671 cs->commands_pending = 0;
672 cs->cur_at_seq = 0; 672 cs->cur_at_seq = 0;
673 cs->gotfwver = -1; 673 cs->gotfwver = -1;
674 cs->open_count = 0; 674 cs->open_count = 0;
@@ -688,8 +688,8 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels,
688 init_waitqueue_head(&cs->waitqueue); 688 init_waitqueue_head(&cs->waitqueue);
689 cs->waiting = 0; 689 cs->waiting = 0;
690 690
691 atomic_set(&cs->mode, M_UNKNOWN); 691 cs->mode = M_UNKNOWN;
692 atomic_set(&cs->mstate, MS_UNINITIALIZED); 692 cs->mstate = MS_UNINITIALIZED;
693 693
694 for (i = 0; i < channels; ++i) { 694 for (i = 0; i < channels; ++i) {
695 gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i); 695 gig_dbg(DEBUG_INIT, "setting up bcs[%d].read", i);
@@ -806,8 +806,8 @@ static void cleanup_cs(struct cardstate *cs)
806 806
807 spin_lock_irqsave(&cs->lock, flags); 807 spin_lock_irqsave(&cs->lock, flags);
808 808
809 atomic_set(&cs->mode, M_UNKNOWN); 809 cs->mode = M_UNKNOWN;
810 atomic_set(&cs->mstate, MS_UNINITIALIZED); 810 cs->mstate = MS_UNINITIALIZED;
811 811
812 clear_at_state(&cs->at_state); 812 clear_at_state(&cs->at_state);
813 dealloc_at_states(cs); 813 dealloc_at_states(cs);
@@ -817,8 +817,8 @@ static void cleanup_cs(struct cardstate *cs)
817 kfree(cs->inbuf->rcvbuf); 817 kfree(cs->inbuf->rcvbuf);
818 cs->inbuf->rcvbuf = NULL; 818 cs->inbuf->rcvbuf = NULL;
819 cs->inbuf->inputstate = INS_command; 819 cs->inbuf->inputstate = INS_command;
820 atomic_set(&cs->inbuf->head, 0); 820 cs->inbuf->head = 0;
821 atomic_set(&cs->inbuf->tail, 0); 821 cs->inbuf->tail = 0;
822 822
823 cb = cs->cmdbuf; 823 cb = cs->cmdbuf;
824 while (cb) { 824 while (cb) {
@@ -832,7 +832,7 @@ static void cleanup_cs(struct cardstate *cs)
832 cs->gotfwver = -1; 832 cs->gotfwver = -1;
833 cs->dle = 0; 833 cs->dle = 0;
834 cs->cur_at_seq = 0; 834 cs->cur_at_seq = 0;
835 atomic_set(&cs->commands_pending, 0); 835 cs->commands_pending = 0;
836 cs->cbytes = 0; 836 cs->cbytes = 0;
837 837
838 spin_unlock_irqrestore(&cs->lock, flags); 838 spin_unlock_irqrestore(&cs->lock, flags);
@@ -862,7 +862,7 @@ int gigaset_start(struct cardstate *cs)
862 cs->connected = 1; 862 cs->connected = 1;
863 spin_unlock_irqrestore(&cs->lock, flags); 863 spin_unlock_irqrestore(&cs->lock, flags);
864 864
865 if (atomic_read(&cs->mstate) != MS_LOCKED) { 865 if (cs->mstate != MS_LOCKED) {
866 cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS); 866 cs->ops->set_modem_ctrl(cs, 0, TIOCM_DTR|TIOCM_RTS);
867 cs->ops->baud_rate(cs, B115200); 867 cs->ops->baud_rate(cs, B115200);
868 cs->ops->set_line_ctrl(cs, CS8); 868 cs->ops->set_line_ctrl(cs, CS8);