Replaced save_flags()/cli()/restore_flags() pair with spin_lock
alternatives.
For this case, I believe spin lock plays no role but I also do not have
a better way.
Tested compile only.
Signed-off-by: Amol Lad <[email protected]>
---
--- linux-2.6.19-rc1-orig/drivers/serial/dz.c 2006-09-21 10:15:41.000000000 +0530
+++ linux-2.6.19-rc1/drivers/serial/dz.c 2006-10-16 12:48:31.000000000 +0530
@@ -778,13 +778,13 @@ int __init dz_init(void)
{
unsigned long flags;
int ret, i;
+ spinlock_t dz_lock = SPIN_LOCK_UNLOCKED;
printk("%s%s\n", dz_name, dz_version);
dz_init_ports();
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&dz_lock,flags);
#ifndef CONFIG_SERIAL_DZ_CONSOLE
/* reset the chip */
@@ -794,7 +794,7 @@ int __init dz_init(void)
/* order matters here... the trick is that flags
is updated... in request_irq - to immediatedly obliterate
it is unwise. */
- restore_flags(flags);
+ spin_unlock_irqrestore(&dz_lock,flags);
if (request_irq(dz_ports[0].port.irq, dz_interrupt,
IRQF_DISABLED, "DZ", &dz_ports[0]))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]