[adm5120] only use trxsplit on NOR flash devices
authorGabor Juhos <juhosg@openwrt.org>
Sun, 4 Nov 2007 14:32:28 +0000 (14:32 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 4 Nov 2007 14:32:28 +0000 (14:32 +0000)
SVN-Revision: 9497

target/linux/adm5120/files/drivers/mtd/trxsplit.c

index 748ad86d2d860ca08493c2c3f0ee9359cf36857d..caf6b76a5a69f75c360e10ba0240a234f9259b11 100644 (file)
@@ -187,6 +187,12 @@ err:
 
 static void __init trxsplit_add_mtd(struct mtd_info *mtd)
 {
+       if (mtd->type != MTD_NORFLASH) {
+               printk(KERN_INFO PFX "'%s' is not a NOR flash, skipped\n",
+                               mtd->name);
+               return;
+       }
+
        if (!trx_mtd)
                trxsplit_findtrx(mtd);
 }