diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/gigaset/common.c | 4 | ||||
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index 4f75cce6fdff..9d4ae04eb33f 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c | |||
@@ -640,7 +640,6 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
640 | return NULL; | 640 | return NULL; |
641 | } | 641 | } |
642 | mutex_init(&cs->mutex); | 642 | mutex_init(&cs->mutex); |
643 | mutex_lock(&cs->mutex); | ||
644 | 643 | ||
645 | gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); | 644 | gig_dbg(DEBUG_INIT, "allocating bcs[0..%d]", channels - 1); |
646 | cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); | 645 | cs->bcs = kmalloc(channels * sizeof(struct bc_state), GFP_KERNEL); |
@@ -738,6 +737,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
738 | 737 | ||
739 | ++cs->cs_init; | 738 | ++cs->cs_init; |
740 | 739 | ||
740 | /* set up character device */ | ||
741 | gigaset_if_init(cs); | 741 | gigaset_if_init(cs); |
742 | 742 | ||
743 | /* set up device sysfs */ | 743 | /* set up device sysfs */ |
@@ -753,11 +753,9 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, | |||
753 | add_timer(&cs->timer); | 753 | add_timer(&cs->timer); |
754 | 754 | ||
755 | gig_dbg(DEBUG_INIT, "cs initialized"); | 755 | gig_dbg(DEBUG_INIT, "cs initialized"); |
756 | mutex_unlock(&cs->mutex); | ||
757 | return cs; | 756 | return cs; |
758 | 757 | ||
759 | error: | 758 | error: |
760 | mutex_unlock(&cs->mutex); | ||
761 | gig_dbg(DEBUG_INIT, "failed"); | 759 | gig_dbg(DEBUG_INIT, "failed"); |
762 | gigaset_freecs(cs); | 760 | gigaset_freecs(cs); |
763 | return NULL; | 761 | return NULL; |
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index f13de20947e0..eb50f3dab5f7 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c | |||
@@ -615,6 +615,8 @@ void gigaset_if_init(struct cardstate *cs) | |||
615 | return; | 615 | return; |
616 | 616 | ||
617 | tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); | 617 | tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); |
618 | |||
619 | mutex_lock(&cs->mutex); | ||
618 | cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); | 620 | cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); |
619 | 621 | ||
620 | if (!IS_ERR(cs->tty_dev)) | 622 | if (!IS_ERR(cs->tty_dev)) |
@@ -623,6 +625,7 @@ void gigaset_if_init(struct cardstate *cs) | |||
623 | warn("could not register device to the tty subsystem"); | 625 | warn("could not register device to the tty subsystem"); |
624 | cs->tty_dev = NULL; | 626 | cs->tty_dev = NULL; |
625 | } | 627 | } |
628 | mutex_unlock(&cs->mutex); | ||
626 | } | 629 | } |
627 | 630 | ||
628 | void gigaset_if_free(struct cardstate *cs) | 631 | void gigaset_if_free(struct cardstate *cs) |