Merge tag 'mtd/for-5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
[linux-2.6-microblaze.git] / drivers / mtd / mtdblock.c
index a808095..03e3de3 100644 (file)
@@ -322,6 +322,10 @@ static void mtdblock_add_mtd(struct mtd_blktrans_ops *tr, struct mtd_info *mtd)
        if (!(mtd->flags & MTD_WRITEABLE))
                dev->mbd.readonly = 1;
 
+       if (mtd_type_is_nand(mtd))
+               pr_warn("%s: MTD device '%s' is NAND, please consider using UBI block devices instead.\n",
+                       tr->name, mtd->name);
+
        if (add_mtd_blktrans_dev(&dev->mbd))
                kfree(dev);
 }