summaryrefslogtreecommitdiffstats
path: root/drivers/char/snsc.c
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 16:44:14 -0600
committerJonathan Corbet <corbet@lwn.net>2008-06-20 14:05:50 -0600
commitc43ef17450dce8cbf50f97497a1949ff8f484e88 (patch)
treeaac874601a18585a501496faea51ede3acc822f3 /drivers/char/snsc.c
parent78a3c3d7c6b89085610edfe86f7790144afc737e (diff)
downloadop-kernel-dev-c43ef17450dce8cbf50f97497a1949ff8f484e88.zip
op-kernel-dev-c43ef17450dce8cbf50f97497a1949ff8f484e88.tar.gz
snsc: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char/snsc.c')
-rw-r--r--drivers/char/snsc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/snsc.c b/drivers/char/snsc.c
index 8fe099a..0b799ac 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -21,6 +21,7 @@
#include <linux/poll.h>
#include <linux/module.h>
#include <linux/slab.h>
+#include <linux/smp_lock.h>
#include <asm/sn/io.h>
#include <asm/sn/sn_sal.h>
#include <asm/sn/module.h>
@@ -104,6 +105,7 @@ scdrv_open(struct inode *inode, struct file *file)
file->private_data = sd;
/* hook this subchannel up to the system controller interrupt */
+ lock_kernel();
rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt,
IRQF_SHARED | IRQF_DISABLED,
SYSCTL_BASENAME, sd);
@@ -111,9 +113,10 @@ scdrv_open(struct inode *inode, struct file *file)
ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch);
kfree(sd);
printk("%s: irq request failed (%d)\n", __func__, rv);
+ unlock_kernel();
return -EBUSY;
}
-
+ unlock_kernel();
return 0;
}
OpenPOWER on IntegriCloud