diff --git a/drivers/mtd/cfi_mtd.c b/drivers/mtd/cfi_mtd.c index f998ffaf26..bf4473ba9e 100644 --- a/drivers/mtd/cfi_mtd.c +++ b/drivers/mtd/cfi_mtd.c @@ -221,6 +221,9 @@ int cfi_mtd_init(void) continue; sprintf(cfi_mtd_names[i], "nor%d", i); +#ifdef CONFIG_CFI_FLASH + mtd->dev = fi->dev; +#endif mtd->name = cfi_mtd_names[i]; mtd->type = MTD_NORFLASH; mtd->flags = MTD_CAP_NORFLASH;