Skip to content

Commit

Permalink
Merge tag 'mtd/fixes-for-5.8-rc5' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/mtd/linux

Pull MTD fixes from Miquel Raynal:
 "MTD:
   - Set a missing master partition panic write flag

  Raw NAND:
   - Fix build issue in the xway driver
   - Fix a wrong return code"

* tag 'mtd/fixes-for-5.8-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux:
  mtd: rawnand: xway: Fix build issue
  mtd: set master partition panic write flag
  nandsim: Fix return code testing of ns_find_operation()
  • Loading branch information
Linus Torvalds committed Jul 7, 2020
2 parents aa27b32 + 880bc52 commit 6d12075
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions drivers/mtd/mtdcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -1273,8 +1273,8 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
return -EROFS;
if (!len)
return 0;
if (!mtd->oops_panic_write)
mtd->oops_panic_write = true;
if (!master->oops_panic_write)
master->oops_panic_write = true;

return master->_panic_write(master, mtd_get_master_ofs(mtd, to), len,
retlen, buf);
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/nandsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,7 @@ static void ns_switch_state(struct nandsim *ns)

NS_DBG("switch_state: operation is unknown, try to find it\n");

if (!ns_find_operation(ns, 0))
if (ns_find_operation(ns, 0))
return;

if ((ns->state & ACTION_MASK) &&
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/raw/xway_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ static int xway_nand_remove(struct platform_device *pdev)
struct nand_chip *chip = &data->chip;
int ret;

ret = mtd_device_unregister(mtd);
ret = mtd_device_unregister(nand_to_mtd(chip));
WARN_ON(ret);
nand_cleanup(chip);

Expand Down

0 comments on commit 6d12075

Please sign in to comment.