diff options
author | Boris Brezillon <boris.brezillon@bootlin.com> | 2018-11-11 08:55:06 +0100 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2018-12-07 10:38:24 +0100 |
commit | 1f2d29e634b3e7abc7b62adf6bb4a676615c02ef (patch) | |
tree | 9206c06f0bd9ffb687e4cac00c2c9ab8f671a1ae /drivers/mtd | |
parent | 996852a97bc684d7771c692364705f0aaf423ba9 (diff) | |
download | linux-1f2d29e634b3e7abc7b62adf6bb4a676615c02ef.tar.bz2 |
mtd: rawnand: Move nand_exec_op() to internal.h
nand_exec_op() is only used by core code (nand_xxx.c files). Let's
move this inline function in drivers/mtd/nand/raw/internals.h.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Tested-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/nand/raw/internals.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/mtd/nand/raw/internals.h b/drivers/mtd/nand/raw/internals.h index 04c2cf74eff3..6e2f61fbc5f0 100644 --- a/drivers/mtd/nand/raw/internals.h +++ b/drivers/mtd/nand/raw/internals.h @@ -95,6 +95,15 @@ void nand_decode_ext_id(struct nand_chip *chip); void panic_nand_wait(struct nand_chip *chip, unsigned long timeo); void sanitize_string(uint8_t *s, size_t len); +static inline int nand_exec_op(struct nand_chip *chip, + const struct nand_operation *op) +{ + if (!chip->exec_op) + return -ENOTSUPP; + + return chip->exec_op(chip, op, false); +} + /* BBT functions */ int nand_markbad_bbt(struct nand_chip *chip, loff_t offs); int nand_isreserved_bbt(struct nand_chip *chip, loff_t offs); |