[PATCH v6 00/18] mtd: nand: denali: Denali NAND IP patch bomb
Masahiro Yamada
yamada.masahiro at socionext.com
Tue Jun 13 01:17:41 PDT 2017
Hi Boris,
2017-06-13 16:02 GMT+09:00 Boris Brezillon <boris.brezillon at free-electrons.com>:
>
> BTW, I also implemented ->read/write_buf_word() since the core may one
> day call these functions, and the default implementations used by the
> core when these hooks are NULL are not appropriate in your case.
>
BTW, why doesn't the default hook in the core do like this?
static uint8_t nand_read_byte(struct mtd_info *mtd)
{
struct nand_chip *chip = mtd_to_nand(mtd);
uint8_t byte;
chip->read_buf(chip, &byte, 1);
return byte;
}
->read_byte() is a special case of ->read_buf() with length==1,
so this should work.
--
Best Regards
Masahiro Yamada
More information about the linux-mtd
mailing list