diff options
Diffstat (limited to 'drivers/isdn/gigaset/common.c')
-rw-r--r-- | drivers/isdn/gigaset/common.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/isdn/gigaset/common.c b/drivers/isdn/gigaset/common.c index e55767b2ccd3..acb7e2656780 100644 --- a/drivers/isdn/gigaset/common.c +++ b/drivers/isdn/gigaset/common.c @@ -460,6 +460,9 @@ void gigaset_freecs(struct cardstate *cs) switch (cs->cs_init) { default: + /* clear device sysfs */ + gigaset_free_dev_sysfs(cs); + gigaset_if_free(cs); gig_dbg(DEBUG_INIT, "clearing hw"); @@ -699,6 +702,7 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, cs->open_count = 0; cs->dev = NULL; cs->tty = NULL; + cs->class = NULL; cs->cidmode = cidmode != 0; //if(onechannel) { //FIXME @@ -760,6 +764,9 @@ struct cardstate *gigaset_initcs(struct gigaset_driver *drv, int channels, gigaset_if_init(cs); + /* set up device sysfs */ + gigaset_init_dev_sysfs(cs); + spin_lock_irqsave(&cs->lock, flags); cs->running = 1; spin_unlock_irqrestore(&cs->lock, flags); @@ -902,9 +909,6 @@ int gigaset_start(struct cardstate *cs) wait_event(cs->waitqueue, !cs->waiting); - /* set up device sysfs */ - gigaset_init_dev_sysfs(cs); - mutex_unlock(&cs->mutex); return 1; @@ -969,9 +973,6 @@ void gigaset_stop(struct cardstate *cs) //FIXME } - /* clear device sysfs */ - gigaset_free_dev_sysfs(cs); - cleanup_cs(cs); exit: |