diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 01:44:23 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 10:51:23 -0800 |
commit | f2e62992a232544d612b7b95e932fbf3592944e1 (patch) | |
tree | 2c845c925ed522453f69d5e8c772fc9153124c2d /arch/um/kernel/irq.c | |
parent | f688144b827749879279c3ad272b8d874fc17231 (diff) |
[PATCH] uml: IRQ handler tidying
Tidying the irq code -
make a variable static
activate_fd can call kmalloc directly since it's now kernel code
added a no-locking comment
fixed a style violation
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/kernel/irq.c')
-rw-r--r-- | arch/um/kernel/irq.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 5c1e611f628..50a288bb875 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c @@ -79,7 +79,7 @@ skip: return 0; } -struct irq_fd *active_fds = NULL; +static struct irq_fd *active_fds = NULL; static struct irq_fd **last_irq_ptr = &active_fds; extern void free_irqs(void); @@ -124,8 +124,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) if (err < 0) goto out; - new_fd = um_kmalloc(sizeof(*new_fd)); err = -ENOMEM; + new_fd = kmalloc(sizeof(struct irq_fd), GFP_KERNEL); if (new_fd == NULL) goto out; @@ -176,9 +176,8 @@ int activate_fd(int irq, int fd, int type, void *dev_id) */ spin_unlock_irqrestore(&irq_lock, flags); kfree(tmp_pfd); - tmp_pfd = NULL; - tmp_pfd = um_kmalloc(n); + tmp_pfd = kmalloc(n, GFP_KERNEL); if (tmp_pfd == NULL) goto out_kfree; |