Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 19321
b: refs/heads/master
c: cc0fa84
h: refs/heads/master
i:
  19319: efb742b
v: v3
  • Loading branch information
Ben Collins authored and Linus Torvalds committed Feb 1, 2006
1 parent 62376f7 commit 3017246
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b62735d9c6212de6fd1b5e96b41d978939fb0dd2
refs/heads/master: cc0fa84a01d328a1ad70076b90f08281c4c79f92
13 changes: 10 additions & 3 deletions trunk/arch/powerpc/platforms/powermac/pfunc_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 2 additions & 3 deletions trunk/include/asm-powerpc/pmac_pfunc.h
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ struct pmf_irq_client {
void *data;
struct module *owner;
struct list_head link;
struct pmf_function *func;
};


Expand All @@ -187,9 +188,7 @@ extern int pmf_register_irq_client(struct device_node *np,
const char *name,
struct pmf_irq_client *client);

extern void pmf_unregister_irq_client(struct device_node *np,
const char *name,
struct pmf_irq_client *client);
extern void pmf_unregister_irq_client(struct pmf_irq_client *client);

/*
* Called by the handlers when an irq happens
Expand Down

0 comments on commit 3017246

Please sign in to comment.