Commit 339dedf7 authored by Benjamin Herrenschmidt's avatar Benjamin Herrenschmidt Committed by Linus Torvalds

powerpc/pmac: Don't register pmac PIC syscore ops when HW not present

The Apple custom PIC only exist in some earlier machine models,
anything with an MPIC will crash on suspend if we register those
syscore ops unconditionally.

This is a regression caused by commit f5a592f7 ("PM / PowerPC: Use
struct syscore_ops instead of sysdevs for PM")
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 55922c9d
...@@ -715,6 +715,7 @@ static struct syscore_ops pmacpic_syscore_ops = { ...@@ -715,6 +715,7 @@ static struct syscore_ops pmacpic_syscore_ops = {
static int __init init_pmacpic_syscore(void) static int __init init_pmacpic_syscore(void)
{ {
if (pmac_irq_hw[0])
register_syscore_ops(&pmacpic_syscore_ops); register_syscore_ops(&pmacpic_syscore_ops);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment