fix magicbox_ide on 2.6.24
[openwrt/svn-archive/archive.git] / target / linux / magicbox / files / drivers / ide / ppc / magicbox_ide.c
index 2e29e8380a768f9cc51b35dc1ce2f55afd5e9118..2c153209317f745d63e15838b82b5f431a7152d3 100644 (file)
@@ -100,8 +100,10 @@ static void __init ide_magicbox_register(unsigned long addr,
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,22)
        if (ide_register_hw(&hw, &hwif) != -1)
-#else
+#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
        if (ide_register_hw(&hw, 1, &hwif) != -1)
+#else
+       if (ide_register_hw(&hw, NULL, 1, &hwif) != -1)
 #endif
        {
                printk(KERN_NOTICE "magicbox-ide: Registered IDE-CF driver\n");