diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-02-10 12:44:23 +0300 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 21:51:23 +0300 |
commit | f2e62992a232544d612b7b95e932fbf3592944e1 (patch) | |
tree | 2c845c925ed522453f69d5e8c772fc9153124c2d /arch/um/os-Linux/irq.c | |
parent | f688144b827749879279c3ad272b8d874fc17231 (diff) | |
download | linux-f2e62992a232544d612b7b95e932fbf3592944e1.tar.xz |
[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/os-Linux/irq.c')
-rw-r--r-- | arch/um/os-Linux/irq.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/um/os-Linux/irq.c b/arch/um/os-Linux/irq.c index d46b818c1311..d1b61d474e0a 100644 --- a/arch/um/os-Linux/irq.c +++ b/arch/um/os-Linux/irq.c @@ -20,6 +20,10 @@ #include "os.h" #include "um_malloc.h" +/* + * Locked by irq_lock in arch/um/kernel/irq.c. Changed by os_create_pollfd + * and os_free_irq_by_cb, which are called under irq_lock. + */ static struct pollfd *pollfds = NULL; static int pollfds_num = 0; static int pollfds_size = 0; @@ -58,7 +62,7 @@ int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds) if (pollfds_num == pollfds_size) { if (size_tmpfds <= pollfds_size * sizeof(pollfds[0])) { /* return min size needed for new pollfds area */ - return((pollfds_size + 1) * sizeof(pollfds[0])); + return (pollfds_size + 1) * sizeof(pollfds[0]); } if (pollfds != NULL) { |