[PATCH] Fix lockdep warning

From: Karsten Keil
Date: Wed Aug 06 2008 - 09:14:58 EST


use correct dynamic spinlock init function.

Signed-off-by: Karsten Keil <kkeil@xxxxxxx>
---
drivers/isdn/mISDN/tei.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
index 6fbae42..d8af45c 100644
--- a/drivers/isdn/mISDN/tei.c
+++ b/drivers/isdn/mISDN/tei.c
@@ -1287,7 +1287,7 @@ create_teimanager(struct mISDNdevice *dev)
if (!mgr)
return -ENOMEM;
INIT_LIST_HEAD(&mgr->layer2);
- mgr->lock = __RW_LOCK_UNLOCKED(mgr->lock);
+ rwlock_init(&mgr->lock);
skb_queue_head_init(&mgr->sendq);
mgr->nextid = 1;
mgr->lastid = MISDN_ID_NONE;
--
1.5.6.4



> The following patch is in:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace.git
>
> branch: cleanups
>
>
> Steven Rostedt (1):
> use rwlock runtime init for drivers/isdn/mISDN/tei.c
>
> ----
> drivers/isdn/mISDN/tei.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> ---------------------------
> commit 30bb0d7d6956526eedb5ad30b9d6ff085801d788
> Author: Steven Rostedt <srostedt@xxxxxxxxxx>
> Date: Wed Dec 10 14:25:23 2008 -0500
>
> use rwlock runtime init for drivers/isdn/mISDN/tei.c
>
> Impact: clean up
>
> __RW_LOCK_UNLOCKED(lock) is meant for compile time initializations.
> rwlock_init(&lock) is used for run time initialization.
>
> This patch converts drivers/isdn/mISDN/tei.c to initialize the
> mrg->lock rwlock.
>
> Signed-off-by: Steven Rostedt <srostedt@xxxxxxxxxx>
>
> diff --git a/drivers/isdn/mISDN/tei.c b/drivers/isdn/mISDN/tei.c
> index 6fbae42..d8af45c 100644
> --- a/drivers/isdn/mISDN/tei.c
> +++ b/drivers/isdn/mISDN/tei.c
> @@ -1287,7 +1287,7 @@ create_teimanager(struct mISDNdevice *dev)
> if (!mgr)
> return -ENOMEM;
> INIT_LIST_HEAD(&mgr->layer2);
> - mgr->lock = __RW_LOCK_UNLOCKED(mgr->lock);
> + rwlock_init(&mgr->lock);
> skb_queue_head_init(&mgr->sendq);
> mgr->nextid = 1;
> mgr->lastid = MISDN_ID_NONE;

--
Karsten Keil
SuSE Labs
ISDN and VOIP development
SUSE LINUX Products GmbH, Maxfeldstr.5 90409 Nuernberg, GF: Markus Rex, HRB 16746 (AG Nuernberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/