diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2008-07-24 00:28:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:24 -0400 |
commit | 4c182ae7810f3fe444e666f3f78c209a7c116fdf (patch) | |
tree | ab9038fe423de834bb2f2b27e248c3cf42aef5b1 /arch/um | |
parent | ed62f77bb631bc4a2d8acb0521b720cb55e58183 (diff) |
arch/um/kernel/irq.c: clean up some functions
Make activate_fd() and free_irq_by_irq_and_dev() static. Remove
init_aio_irq() since it has no users.
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: WANG Cong <wangcong@zeuux.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/include/irq_kern.h | 2 | ||||
-rw-r--r-- | arch/um/include/irq_user.h | 2 | ||||
-rw-r--r-- | arch/um/kernel/irq.c | 35 |
3 files changed, 2 insertions, 37 deletions
diff --git a/arch/um/include/irq_kern.h b/arch/um/include/irq_kern.h index 4f775597fd5f..fba3895274f9 100644 --- a/arch/um/include/irq_kern.h +++ b/arch/um/include/irq_kern.h | |||
@@ -13,8 +13,6 @@ extern int um_request_irq(unsigned int irq, int fd, int type, | |||
13 | irq_handler_t handler, | 13 | irq_handler_t handler, |
14 | unsigned long irqflags, const char * devname, | 14 | unsigned long irqflags, const char * devname, |
15 | void *dev_id); | 15 | void *dev_id); |
16 | extern int init_aio_irq(int irq, char *name, | ||
17 | irq_handler_t handler); | ||
18 | 16 | ||
19 | #endif | 17 | #endif |
20 | 18 | ||
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index e60b31873de1..c6c784df2673 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h | |||
@@ -21,8 +21,6 @@ struct irq_fd { | |||
21 | enum { IRQ_READ, IRQ_WRITE }; | 21 | enum { IRQ_READ, IRQ_WRITE }; |
22 | 22 | ||
23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); | 23 | extern void sigio_handler(int sig, struct uml_pt_regs *regs); |
24 | extern int activate_fd(int irq, int fd, int type, void *dev_id); | ||
25 | extern void free_irq_by_irq_and_dev(unsigned int irq, void *dev_id); | ||
26 | extern void free_irq_by_fd(int fd); | 24 | extern void free_irq_by_fd(int fd); |
27 | extern void reactivate_fd(int fd, int irqnum); | 25 | extern void reactivate_fd(int fd, int irqnum); |
28 | extern void deactivate_fd(int fd, int irqnum); | 26 | extern void deactivate_fd(int fd, int irqnum); |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 91587f8db340..3d7aad09b171 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -102,7 +102,7 @@ void sigio_handler(int sig, struct uml_pt_regs *regs) | |||
102 | 102 | ||
103 | static DEFINE_SPINLOCK(irq_lock); | 103 | static DEFINE_SPINLOCK(irq_lock); |
104 | 104 | ||
105 | int activate_fd(int irq, int fd, int type, void *dev_id) | 105 | static int activate_fd(int irq, int fd, int type, void *dev_id) |
106 | { | 106 | { |
107 | struct pollfd *tmp_pfd; | 107 | struct pollfd *tmp_pfd; |
108 | struct irq_fd *new_fd, *irq_fd; | 108 | struct irq_fd *new_fd, *irq_fd; |
@@ -216,7 +216,7 @@ static int same_irq_and_dev(struct irq_fd *irq, void *d) | |||
216 | return ((irq->irq == data->irq) && (irq->id == data->dev)); | 216 | return ((irq->irq == data->irq) && (irq->id == data->dev)); |
217 | } | 217 | } |
218 | 218 | ||
219 | void free_irq_by_irq_and_dev(unsigned int irq, void *dev) | 219 | static void free_irq_by_irq_and_dev(unsigned int irq, void *dev) |
220 | { | 220 | { |
221 | struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, | 221 | struct irq_and_dev data = ((struct irq_and_dev) { .irq = irq, |
222 | .dev = dev }); | 222 | .dev = dev }); |
@@ -403,37 +403,6 @@ void __init init_IRQ(void) | |||
403 | } | 403 | } |
404 | } | 404 | } |
405 | 405 | ||
406 | int init_aio_irq(int irq, char *name, irq_handler_t handler) | ||
407 | { | ||
408 | int fds[2], err; | ||
409 | |||
410 | err = os_pipe(fds, 1, 1); | ||
411 | if (err) { | ||
412 | printk(KERN_ERR "init_aio_irq - os_pipe failed, err = %d\n", | ||
413 | -err); | ||
414 | goto out; | ||
415 | } | ||
416 | |||
417 | err = um_request_irq(irq, fds[0], IRQ_READ, handler, | ||
418 | IRQF_DISABLED | IRQF_SAMPLE_RANDOM, name, | ||
419 | (void *) (long) fds[0]); | ||
420 | if (err) { | ||
421 | printk(KERN_ERR "init_aio_irq - : um_request_irq failed, " | ||
422 | "err = %d\n", | ||
423 | err); | ||
424 | goto out_close; | ||
425 | } | ||
426 | |||
427 | err = fds[1]; | ||
428 | goto out; | ||
429 | |||
430 | out_close: | ||
431 | os_close_file(fds[0]); | ||
432 | os_close_file(fds[1]); | ||
433 | out: | ||
434 | return err; | ||
435 | } | ||
436 | |||
437 | /* | 406 | /* |
438 | * IRQ stack entry and exit: | 407 | * IRQ stack entry and exit: |
439 | * | 408 | * |