summaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/irq_user.c
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@pretzel.yyz.us>2005-06-23 03:50:57 +0200
committerJeff Garzik <jgarzik@pobox.com>2005-06-23 03:50:57 +0200
commita5324343955997d1439f26518ddac567cd5d134b (patch)
treef43558389c41e3a0f076c4ee55d77c4aa1561779 /arch/um/kernel/irq_user.c
parent[PATCH] A new 10GB Ethernet Driver by Chelsio Communications (diff)
parentMerge master.kernel.org:/home/rmk/linux-2.6-arm (diff)
downloadlinux-a5324343955997d1439f26518ddac567cd5d134b.tar.xz
linux-a5324343955997d1439f26518ddac567cd5d134b.zip
Merge /spare/repo/linux-2.6/
Diffstat (limited to 'arch/um/kernel/irq_user.c')
-rw-r--r--arch/um/kernel/irq_user.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/arch/um/kernel/irq_user.c b/arch/um/kernel/irq_user.c
index 6d6f9484b884..c3ccaf24f3e0 100644
--- a/arch/um/kernel/irq_user.c
+++ b/arch/um/kernel/irq_user.c
@@ -85,8 +85,6 @@ void sigio_handler(int sig, union uml_pt_regs *regs)
next = irq_fd->next;
if(irq_fd->freed){
free_irq(irq_fd->irq, irq_fd->id);
- free_irq_by_irq_and_dev(irq_fd->irq,
- irq_fd->id);
}
}
}
@@ -236,9 +234,15 @@ static void free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg)
(*prev)->fd, pollfds[i].fd);
goto out;
}
- memcpy(&pollfds[i], &pollfds[i + 1],
- (pollfds_num - i - 1) * sizeof(pollfds[0]));
+
pollfds_num--;
+
+ /* This moves the *whole* array after pollfds[i] (though
+ * it doesn't spot as such)! */
+
+ memmove(&pollfds[i], &pollfds[i + 1],
+ (pollfds_num - i) * sizeof(pollfds[0]));
+
if(last_irq_ptr == &old_fd->next)
last_irq_ptr = prev;
*prev = (*prev)->next;