aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorJonathan Corbet <corbet@lwn.net>2008-05-15 18:44:14 -0400
committerJonathan Corbet <corbet@lwn.net>2008-06-20 16:05:50 -0400
commitc43ef17450dce8cbf50f97497a1949ff8f484e88 (patch)
treeaac874601a18585a501496faea51ede3acc822f3 /drivers/char
parent78a3c3d7c6b89085610edfe86f7790144afc737e (diff)
snsc: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/char')
-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 8fe099a41065..0b799ac1b049 100644
--- a/drivers/char/snsc.c
+++ b/drivers/char/snsc.c
@@ -21,6 +21,7 @@
21#include <linux/poll.h> 21#include <linux/poll.h>
22#include <linux/module.h> 22#include <linux/module.h>
23#include <linux/slab.h> 23#include <linux/slab.h>
24#include <linux/smp_lock.h>
24#include <asm/sn/io.h> 25#include <asm/sn/io.h>
25#include <asm/sn/sn_sal.h> 26#include <asm/sn/sn_sal.h>
26#include <asm/sn/module.h> 27#include <asm/sn/module.h>
@@ -104,6 +105,7 @@ scdrv_open(struct inode *inode, struct file *file)
104 file->private_data = sd; 105 file->private_data = sd;
105 106
106 /* hook this subchannel up to the system controller interrupt */ 107 /* hook this subchannel up to the system controller interrupt */
108 lock_kernel();
107 rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt, 109 rv = request_irq(SGI_UART_VECTOR, scdrv_interrupt,
108 IRQF_SHARED | IRQF_DISABLED, 110 IRQF_SHARED | IRQF_DISABLED,
109 SYSCTL_BASENAME, sd); 111 SYSCTL_BASENAME, sd);
@@ -111,9 +113,10 @@ scdrv_open(struct inode *inode, struct file *file)
111 ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch); 113 ia64_sn_irtr_close(sd->sd_nasid, sd->sd_subch);
112 kfree(sd); 114 kfree(sd);
113 printk("%s: irq request failed (%d)\n", __func__, rv); 115 printk("%s: irq request failed (%d)\n", __func__, rv);
116 unlock_kernel();
114 return -EBUSY; 117 return -EBUSY;
115 } 118 }
116 119 unlock_kernel();
117 return 0; 120 return 0;
118} 121}
119 122