]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/dtlk.c
SAM9 watchdog: update for moved headers
[linux-2.6-omap-h63xx.git] / drivers / char / dtlk.c
index abde6ddefe696e7e0af352e918085c68a83f4d89..6b900b297cc615f7687b8a320fd7ebc4987338a7 100644 (file)
@@ -56,6 +56,7 @@
 #include <linux/errno.h>       /* for -EBUSY */
 #include <linux/ioport.h>      /* for request_region */
 #include <linux/delay.h>       /* for loops_per_jiffy */
+#include <linux/smp_lock.h>    /* cycle_kernel_lock() */
 #include <asm/io.h>            /* for inb_p, outb_p, inb, outb, etc. */
 #include <asm/uaccess.h>       /* for get_user, etc. */
 #include <linux/wait.h>                /* for wait_queue */
@@ -288,10 +289,12 @@ static int dtlk_ioctl(struct inode *inode,
        }
 }
 
+/* Note that nobody ever sets dtlk_busy... */
 static int dtlk_open(struct inode *inode, struct file *file)
 {
        TRACE_TEXT("(dtlk_open");
 
+       cycle_kernel_lock();
        nonseekable_open(inode, file);
        switch (iminor(inode)) {
        case DTLK_MINOR: