sfi: table irq 0xFF means 'no interrupt'
authorKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Fri, 26 Aug 2011 11:20:59 +0000 (12:20 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 26 Aug 2011 16:03:29 +0000 (09:03 -0700)
According to the SFI specification irq number 0xFF means device has no
interrupt or interrupt attached via GPIO.

Currently, we don't handle this special case and set irq field in
*_board_info structs to 255.  It leads to confusion in some drivers.
Accelerometer driver tries to register interrupt 255, fails and prints
"Cannot get IRQ" to dmesg.

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/platform/mrst/mrst.c

index 7000e74b30877bea018f46946f8d99b1275e7624..58425adc22c6ae156b01b916fe6703428b6391f9 100644 (file)
@@ -689,7 +689,9 @@ static int __init sfi_parse_devs(struct sfi_table_header *table)
                        irq_attr.trigger = 1;
                        irq_attr.polarity = 1;
                        io_apic_set_pci_routing(NULL, pentry->irq, &irq_attr);
-               }
+               } else
+                       pentry->irq = 0; /* No irq */
+
                switch (pentry->type) {
                case SFI_DEV_TYPE_IPC:
                        /* ID as IRQ is a hack that will go away */