aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/chan_kern.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c
index 7b8baf146acc..9fdfad649536 100644
--- a/arch/um/drivers/chan_kern.c
+++ b/arch/um/drivers/chan_kern.c
@@ -236,11 +236,11 @@ void free_irqs(void)
236 struct chan *chan; 236 struct chan *chan;
237 LIST_HEAD(list); 237 LIST_HEAD(list);
238 struct list_head *ele; 238 struct list_head *ele;
239 unsigned long flags;
239 240
240 spin_lock_irq(&irqs_to_free_lock); 241 spin_lock_irqsave(&irqs_to_free_lock, flags);
241 list_splice_init(&irqs_to_free, &list); 242 list_splice_init(&irqs_to_free, &list);
242 INIT_LIST_HEAD(&irqs_to_free); 243 spin_unlock_irqrestore(&irqs_to_free_lock, flags);
243 spin_unlock_irq(&irqs_to_free_lock);
244 244
245 list_for_each(ele, &list){ 245 list_for_each(ele, &list){
246 chan = list_entry(ele, struct chan, free_list); 246 chan = list_entry(ele, struct chan, free_list);
@@ -255,13 +255,15 @@ void free_irqs(void)
255 255
256static void close_one_chan(struct chan *chan, int delay_free_irq) 256static void close_one_chan(struct chan *chan, int delay_free_irq)
257{ 257{
258 unsigned long flags;
259
258 if(!chan->opened) 260 if(!chan->opened)
259 return; 261 return;
260 262
261 if(delay_free_irq){ 263 if(delay_free_irq){
262 spin_lock_irq(&irqs_to_free_lock); 264 spin_lock_irqsave(&irqs_to_free_lock, flags);
263 list_add(&chan->free_list, &irqs_to_free); 265 list_add(&chan->free_list, &irqs_to_free);
264 spin_unlock_irq(&irqs_to_free_lock); 266 spin_unlock_irqrestore(&irqs_to_free_lock, flags);
265 } 267 }
266 else { 268 else {
267 if(chan->input) 269 if(chan->input)