Skip to content

Commit b85051e

Browse files
committed
Merge tag 'fixes-for-5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux
Pull MTD fixes from Richard Weinberger: - Fix a PM regression in brcmnand driver - Propagate ECC information correctly on SPI-NAND - Make sure no MTD name is used multiple time in nvmem * tag 'fixes-for-5.7-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux: mtd:rawnand: brcmnand: Fix PM resume crash mtd: Fix mtd not registered due to nvmem name collision mtd: spinand: Propagate ECC information to the MTD structure
2 parents fea371e + f3a6a6c commit b85051e

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

drivers/mtd/mtdcore.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ static int mtd_nvmem_add(struct mtd_info *mtd)
555555

556556
config.id = -1;
557557
config.dev = &mtd->dev;
558-
config.name = mtd->name;
558+
config.name = dev_name(&mtd->dev);
559559
config.owner = THIS_MODULE;
560560
config.reg_read = mtd_nvmem_reg_read;
561561
config.size = mtd->size;

drivers/mtd/nand/raw/brcmnand/brcmnand.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2728,9 +2728,8 @@ static int brcmnand_resume(struct device *dev)
27282728
flash_dma_writel(ctrl, FLASH_DMA_ERROR_STATUS, 0);
27292729
}
27302730

2731-
if (has_edu(ctrl))
2731+
if (has_edu(ctrl)) {
27322732
ctrl->edu_config = edu_readl(ctrl, EDU_CONFIG);
2733-
else {
27342733
edu_writel(ctrl, EDU_CONFIG, ctrl->edu_config);
27352734
edu_readl(ctrl, EDU_CONFIG);
27362735
brcmnand_edu_init(ctrl);

drivers/mtd/nand/spi/core.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,10 @@ static int spinand_init(struct spinand_device *spinand)
10891089

10901090
mtd->oobavail = ret;
10911091

1092+
/* Propagate ECC information to mtd_info */
1093+
mtd->ecc_strength = nand->eccreq.strength;
1094+
mtd->ecc_step_size = nand->eccreq.step_size;
1095+
10921096
return 0;
10931097

10941098
err_cleanup_nanddev:

0 commit comments

Comments
 (0)