mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
mtd: Stop updating erase_info->state and calling mtd_erase_callback()
MTD users are no longer checking erase_info->state to determine if the erase operation failed or succeeded. Moreover, mtd_erase_callback() is now a NOP. We can safely get rid of all mtd_erase_callback() calls and all erase_info->state assignments. While at it, get rid of the erase_info->state field, all MTD_ERASE_XXX definitions and the mtd_erase_callback() function. Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Richard Weinberger <richard@nod.at> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com> Acked-by: Bert Kenward <bkenward@solarflare.com> --- Changes in v2: - Address a few coding style issues (reported by Miquel) - Remove comments that are no longer valid (reported by Miquel)
This commit is contained in:
parent
8f347c4232
commit
e7bfb3fdbd
30 changed files with 23 additions and 204 deletions
|
@ -380,14 +380,8 @@ out:
|
|||
*/
|
||||
static int lpddr2_nvm_erase(struct mtd_info *mtd, struct erase_info *instr)
|
||||
{
|
||||
int ret = lpddr2_nvm_do_block_op(mtd, instr->addr, instr->len,
|
||||
LPDDR2_NVM_ERASE);
|
||||
if (!ret) {
|
||||
instr->state = MTD_ERASE_DONE;
|
||||
mtd_erase_callback(instr);
|
||||
}
|
||||
|
||||
return ret;
|
||||
return lpddr2_nvm_do_block_op(mtd, instr->addr, instr->len,
|
||||
LPDDR2_NVM_ERASE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue