mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
mtd: Uninline mtd_write_oob and move it to mtdcore.c
There's no reason for having mtd_write_oob inlined in mtd.h header. Move it to mtdcore.c where it belongs. Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Acked-by: Boris Brezillon <boris.brezillon@free-electrons.com> Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
This commit is contained in:
parent
596cf083da
commit
5f50d82d89
2 changed files with 13 additions and 11 deletions
|
@ -1031,6 +1031,18 @@ int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(mtd_read_oob);
|
EXPORT_SYMBOL_GPL(mtd_read_oob);
|
||||||
|
|
||||||
|
int mtd_write_oob(struct mtd_info *mtd, loff_t to,
|
||||||
|
struct mtd_oob_ops *ops)
|
||||||
|
{
|
||||||
|
ops->retlen = ops->oobretlen = 0;
|
||||||
|
if (!mtd->_write_oob)
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
if (!(mtd->flags & MTD_WRITEABLE))
|
||||||
|
return -EROFS;
|
||||||
|
return mtd->_write_oob(mtd, to, ops);
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(mtd_write_oob);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mtd_ooblayout_ecc - Get the OOB region definition of a specific ECC section
|
* mtd_ooblayout_ecc - Get the OOB region definition of a specific ECC section
|
||||||
* @mtd: MTD device structure
|
* @mtd: MTD device structure
|
||||||
|
|
|
@ -351,17 +351,7 @@ int mtd_panic_write(struct mtd_info *mtd, loff_t to, size_t len, size_t *retlen,
|
||||||
const u_char *buf);
|
const u_char *buf);
|
||||||
|
|
||||||
int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
|
int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops);
|
||||||
|
int mtd_write_oob(struct mtd_info *mtd, loff_t to, struct mtd_oob_ops *ops);
|
||||||
static inline int mtd_write_oob(struct mtd_info *mtd, loff_t to,
|
|
||||||
struct mtd_oob_ops *ops)
|
|
||||||
{
|
|
||||||
ops->retlen = ops->oobretlen = 0;
|
|
||||||
if (!mtd->_write_oob)
|
|
||||||
return -EOPNOTSUPP;
|
|
||||||
if (!(mtd->flags & MTD_WRITEABLE))
|
|
||||||
return -EROFS;
|
|
||||||
return mtd->_write_oob(mtd, to, ops);
|
|
||||||
}
|
|
||||||
|
|
||||||
int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
|
int mtd_get_fact_prot_info(struct mtd_info *mtd, size_t len, size_t *retlen,
|
||||||
struct otp_info *buf);
|
struct otp_info *buf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue