mtd: rawnand: Pass a nand_chip object to all nand_xxx_bbt() helpers
Let's make the raw NAND API consistent by patching all helpers and hooks to take a nand_chip object instead of an mtd_info one or remove the mtd_info object when both are passed. Let's tackle the nand_xxx_bbt() helpers. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Этот коммит содержится в:

коммит произвёл
Miquel Raynal

родитель
858838b87e
Коммит
5740d4c4f9
@@ -515,7 +515,7 @@ static int nand_block_markbad_lowlevel(struct mtd_info *mtd, loff_t ofs)
|
||||
|
||||
/* Mark block bad in BBT */
|
||||
if (chip->bbt) {
|
||||
res = nand_markbad_bbt(mtd, ofs);
|
||||
res = nand_markbad_bbt(chip, ofs);
|
||||
if (!ret)
|
||||
ret = res;
|
||||
}
|
||||
@@ -565,7 +565,7 @@ static int nand_block_isreserved(struct mtd_info *mtd, loff_t ofs)
|
||||
if (!chip->bbt)
|
||||
return 0;
|
||||
/* Return info from the table */
|
||||
return nand_isreserved_bbt(mtd, ofs);
|
||||
return nand_isreserved_bbt(chip, ofs);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -585,7 +585,7 @@ static int nand_block_checkbad(struct mtd_info *mtd, loff_t ofs, int allowbbt)
|
||||
return chip->block_bad(chip, ofs);
|
||||
|
||||
/* Return info from the table */
|
||||
return nand_isbad_bbt(mtd, ofs, allowbbt);
|
||||
return nand_isbad_bbt(chip, ofs, allowbbt);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Ссылка в новой задаче
Block a user