Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[sfrench/cifs-2.6.git] / arch / sh / kernel / io_trapped.c
index 4a8bb4eeb8ad7ffc5dee5a312712fafda419028c..2947d2bd12919e5d19117839a9d180ff918a93f3 100644 (file)
@@ -91,10 +91,14 @@ int register_trapped_io(struct trapped_io *tiop)
        tiop->magic = IO_TRAPPED_MAGIC;
        INIT_LIST_HEAD(&tiop->list);
        spin_lock_irq(&trapped_lock);
+#ifdef CONFIG_HAS_IOPORT
        if (flags & IORESOURCE_IO)
                list_add(&tiop->list, &trapped_io);
+#endif
+#ifdef CONFIG_HAS_IOMEM
        if (flags & IORESOURCE_MEM)
                list_add(&tiop->list, &trapped_mem);
+#endif
        spin_unlock_irq(&trapped_lock);
 
        return 0;