aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/kernel')
-rw-r--r--arch/um/kernel/irq.c41
1 files changed, 30 insertions, 11 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 9f18061ef4c9..dcd814971995 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -31,7 +31,7 @@
31#include "kern_util.h" 31#include "kern_util.h"
32#include "irq_user.h" 32#include "irq_user.h"
33#include "irq_kern.h" 33#include "irq_kern.h"
34 34#include "os.h"
35 35
36/* 36/*
37 * Generic, controller-independent functions: 37 * Generic, controller-independent functions:
@@ -168,13 +168,32 @@ void __init init_IRQ(void)
168 } 168 }
169} 169}
170 170
171/* 171int init_aio_irq(int irq, char *name, irqreturn_t (*handler)(int, void *,
172 * Overrides for Emacs so that we follow Linus's tabbing style. 172 struct pt_regs *))
173 * Emacs will notice this stuff at the end of the file and automatically 173{
174 * adjust the settings for this buffer only. This must remain at the end 174 int fds[2], err;
175 * of the file. 175
176 * --------------------------------------------------------------------------- 176 err = os_pipe(fds, 1, 1);
177 * Local variables: 177 if(err){
178 * c-file-style: "linux" 178 printk("init_aio_irq - os_pipe failed, err = %d\n", -err);
179 * End: 179 goto out;
180 */ 180 }
181
182 err = um_request_irq(irq, fds[0], IRQ_READ, handler,
183 SA_INTERRUPT | SA_SAMPLE_RANDOM, name,
184 (void *) (long) fds[0]);
185 if(err){
186 printk("init_aio_irq - : um_request_irq failed, err = %d\n",
187 err);
188 goto out_close;
189 }
190
191 err = fds[1];
192 goto out;
193
194 out_close:
195 os_close_file(fds[0]);
196 os_close_file(fds[1]);
197 out:
198 return(err);
199}