From 51aff5b596010d76ac8144fd94649f007785dfac Mon Sep 17 00:00:00 2001
From: Gabor Juhos <juhosg@openwrt.org>
Date: Sun, 4 Nov 2007 14:32:28 +0000
Subject: [adm5120] only use trxsplit on NOR flash devices

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9497 3c298f89-4303-0410-b956-a3cf2f4a3e73
---
 target/linux/adm5120/files/drivers/mtd/trxsplit.c | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'target/linux')

diff --git a/target/linux/adm5120/files/drivers/mtd/trxsplit.c b/target/linux/adm5120/files/drivers/mtd/trxsplit.c
index 748ad86d2d..caf6b76a5a 100644
--- a/target/linux/adm5120/files/drivers/mtd/trxsplit.c
+++ b/target/linux/adm5120/files/drivers/mtd/trxsplit.c
@@ -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);
 }
-- 
cgit v1.2.3