[POWERPC] Invert null match behaviour for irq_hosts
Currently if you don't specify a match callback for your irq_host it's assumed you match everything. This is a kind of opt-out approach, and turns out to be the exception rather than the rule. So change the semantics to be opt-in, ie. you don't match anything unless you provide a match callback. This in itself isn't very useful, but will allow us to provide a default match implementation in a subsequent patch. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:

committed by
Paul Mackerras

parent
52964f87c6
commit
8528ab84eb
@@ -523,7 +523,7 @@ struct irq_host *irq_find_host(struct device_node *node)
|
||||
*/
|
||||
spin_lock_irqsave(&irq_big_lock, flags);
|
||||
list_for_each_entry(h, &irq_hosts, link)
|
||||
if (h->ops->match == NULL || h->ops->match(h, node)) {
|
||||
if (h->ops->match != NULL && h->ops->match(h, node)) {
|
||||
found = h;
|
||||
break;
|
||||
}
|
||||
|
Reference in New Issue
Block a user