x86, i8259: Only register sysdev if we have a real 8259 PIC
commit97f31b3e803a18e75e4f6e5d0beeda3b6e7a9732
authorAdam Lackorzynski <adam@os.inf.tu-dresden.de>
Tue, 20 Jul 2010 22:18:19 +0000 (20 15:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 2 Aug 2010 17:29:57 +0000 (2 10:29 -0700)
tree6d269b8427dc776017af94c4dc078c62fa5abf5d
parent43197d90b5c24db796ff4448b3ace7f46048dab3
x86, i8259: Only register sysdev if we have a real 8259 PIC

commit 087b255a2b43f417af83cb44e0bb02507f36b7fe upstream.

My platform makes use of the null_legacy_pic choice and oopses when doing
a shutdown as the shutdown code goes through all the registered sysdevs
and calls their shutdown method which in my case poke on a non-existing
i8259.  Imho the i8259 specific sysdev should only be registered if the
i8259 is actually there.

Do not register the sysdev function when the null_legacy_pic is used so
that the i8259 resume, suspend and shutdown functions are not called.

Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de>
LKML-Reference: <201007202218.o6KMIJ3m020955@imap1.linux-foundation.org>
Cc: Jacob Pan <jacob.jun.pan@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
arch/x86/kernel/i8259.c