diff options
author | Ben Collins <bcollins@ubuntu.com> | 2006-02-01 03:04:47 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-02-01 08:53:10 -0800 |
commit | cc0fa84a01d328a1ad70076b90f08281c4c79f92 (patch) | |
tree | c588be11c6f3ed5888647444157c0a9ef5b28a57 /arch | |
parent | b62735d9c6212de6fd1b5e96b41d978939fb0dd2 (diff) | |
download | linux-3.10-cc0fa84a01d328a1ad70076b90f08281c4c79f92.tar.gz linux-3.10-cc0fa84a01d328a1ad70076b90f08281c4c79f92.tar.bz2 linux-3.10-cc0fa84a01d328a1ad70076b90f08281c4c79f92.zip |
[PATCH] powerpc: enable irq's for platform functions.
Make the platform function interrupt functions actually work. Calls
irq_enable() for the first in the list, and irq_disable() for the last.
Added *func to struct irq_client so the the user can pass just that to
pmf_unregister_irq_client().
Signed-off-by: Ben Collins <bcollins@ubuntu.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/platforms/powermac/pfunc_core.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/powermac/pfunc_core.c b/arch/powerpc/platforms/powermac/pfunc_core.c index c32c623001d..356a739e52b 100644 --- a/arch/powerpc/platforms/powermac/pfunc_core.c +++ b/arch/powerpc/platforms/powermac/pfunc_core.c @@ -862,21 +862,28 @@ int pmf_register_irq_client(struct device_node *target, spin_unlock_irqrestore(&pmf_lock, flags); return -ENODEV; } + if (list_empty(&func->irq_clients)) + func->dev->handlers->irq_enable(func); list_add(&client->link, &func->irq_clients); + client->func = func; spin_unlock_irqrestore(&pmf_lock, flags); return 0; } EXPORT_SYMBOL_GPL(pmf_register_irq_client); -void pmf_unregister_irq_client(struct device_node *np, - const char *name, - struct pmf_irq_client *client) +void pmf_unregister_irq_client(struct pmf_irq_client *client) { + struct pmf_function *func = client->func; unsigned long flags; + BUG_ON(func == NULL); + spin_lock_irqsave(&pmf_lock, flags); + client->func = NULL; list_del(&client->link); + if (list_empty(&func->irq_clients)) + func->dev->handlers->irq_disable(func); spin_unlock_irqrestore(&pmf_lock, flags); } EXPORT_SYMBOL_GPL(pmf_unregister_irq_client); |