drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero
[safe/jmp/linux-2.6] / drivers / watchdog / ixp4xx_wdt.c
index 41264a5..147b4d5 100644 (file)
@@ -29,7 +29,7 @@ static int nowayout = WATCHDOG_NOWAYOUT;
 static int heartbeat = 60;     /* (secs) Default is 1 minute */
 static unsigned long wdt_status;
 static unsigned long boot_status;
-static spin_lock_t wdt_lock;
+static DEFINE_SPINLOCK(wdt_lock);
 
 #define WDT_TICK_RATE (IXP4XX_PERIPHERAL_BUS_CLOCK * 1000000UL)
 
@@ -174,10 +174,8 @@ static struct miscdevice ixp4xx_wdt_miscdev = {
 static int __init ixp4xx_wdt_init(void)
 {
        int ret;
-       unsigned long processor_id;
 
-       asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
-       if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+       if (!(read_cpuid_id() & 0xf) && !cpu_is_ixp46x()) {
                printk(KERN_ERR "IXP4XXX Watchdog: Rev. A0 IXP42x CPU detected"
                        " - watchdog disabled\n");