diff options
author | Tilman Schmidt <tilman@imap.cc> | 2007-02-12 00:52:24 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 09:48:29 -0800 |
commit | 7435f50e1261f569c660efb4ae52e8bc21a92cbd (patch) | |
tree | 9ea297ea0b9a332ab9538d5cc986c83f328c5c22 /drivers/isdn/gigaset/interface.c | |
parent | 163da958ba5282cbf85e8b3dc08e4f51f8b01c5e (diff) | |
download | linux-7435f50e1261f569c660efb4ae52e8bc21a92cbd.tar.gz linux-7435f50e1261f569c660efb4ae52e8bc21a92cbd.tar.bz2 linux-7435f50e1261f569c660efb4ae52e8bc21a92cbd.zip |
[PATCH] drivers/isdn/gigaset: reduce mutex scope
Do not lock the cardstate structure mutex earlier than necessary.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/isdn/gigaset/interface.c')
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 3 |
1 files changed, 3 insertions, 0 deletions
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) return; tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); + + mutex_lock(&cs->mutex); cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); if (!IS_ERR(cs->tty_dev)) @@ -623,6 +625,7 @@ void gigaset_if_init(struct cardstate *cs) warn("could not register device to the tty subsystem"); cs->tty_dev = NULL; } + mutex_unlock(&cs->mutex); } void gigaset_if_free(struct cardstate *cs) |