summaryrefslogtreecommitdiff
path: root/drivers/misc/ibmasm/module.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2005-01-07 22:04:45 -0800
committerLinus Torvalds <torvalds@evo.osdl.org>2005-01-07 22:04:45 -0800
commit9ee22704b6e468890fe1cfa6f75591c507a982d6 (patch)
tree36666ae0ec863b990c8eb27dc5886ea3f4bff027 /drivers/misc/ibmasm/module.c
parent24e4a599b69d5ad4475be84ed231257f98c37516 (diff)
[PATCH] Lock initializer unifying: Misc drivers
To make spinlock/rwlock initialization consistent all over the kernel, this patch converts explicit lock-initializers into spin_lock_init() and rwlock_init() calls. Currently, spinlocks and rwlocks are initialized in two different ways: lock = SPIN_LOCK_UNLOCKED spin_lock_init(&lock) rwlock = RW_LOCK_UNLOCKED rwlock_init(&rwlock) this patch converts all explicit lock initializations to spin_lock_init() or rwlock_init(). (Besides consistency this also helps automatic lock validators and debugging code.) The conversion was done with a script, it was verified manually and it was reviewed, compiled and tested as far as possible on x86, ARM, PPC. There is no runtime overhead or actual code change resulting out of this patch, because spin_lock_init() and rwlock_init() are macros and are thus equivalent to the explicit initialization method. That's the second batch of the unifying patches. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/misc/ibmasm/module.c')
-rw-r--r--drivers/misc/ibmasm/module.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/ibmasm/module.c b/drivers/misc/ibmasm/module.c
index 4df82bbbe9d7..c46da50699ba 100644
--- a/drivers/misc/ibmasm/module.c
+++ b/drivers/misc/ibmasm/module.c
@@ -107,7 +107,7 @@ static int __devinit ibmasm_init_one(struct pci_dev *pdev, const struct pci_devi
goto error_remote_queue;
}
- sp->lock = SPIN_LOCK_UNLOCKED;
+ spin_lock_init(&sp->lock);
INIT_LIST_HEAD(&sp->command_queue);
result = request_irq(sp->irq, ibmasm_interrupt_handler, SA_SHIRQ, sp->devname, (void*)sp);