aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>2016-04-12 16:46:39 -0400
committerJacek Anaszewski <j.anaszewski@samsung.com>2016-04-13 04:23:14 -0400
commit0c034fe37718990e0ffdd9622bd6cc5b4f93111f (patch)
tree64dc76af5a7e7923387dd3706fab0ccdfb9be1cf /drivers/mtd
parent916fe619951f41b55d4f2b9f26d64ad981bc0dfa (diff)
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>
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/mtdcore.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index 309625130b21..99d83f3331b0 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -997,6 +997,18 @@ int mtd_read_oob(struct mtd_info *mtd, loff_t from, struct mtd_oob_ops *ops)
997} 997}
998EXPORT_SYMBOL_GPL(mtd_read_oob); 998EXPORT_SYMBOL_GPL(mtd_read_oob);
999 999
1000int mtd_write_oob(struct mtd_info *mtd, loff_t to,
1001 struct mtd_oob_ops *ops)
1002{
1003 ops->retlen = ops->oobretlen = 0;
1004 if (!mtd->_write_oob)
1005 return -EOPNOTSUPP;
1006 if (!(mtd->flags & MTD_WRITEABLE))
1007 return -EROFS;
1008 return mtd->_write_oob(mtd, to, ops);
1009}
1010EXPORT_SYMBOL_GPL(mtd_write_oob);
1011
1000/* 1012/*
1001 * Method to access the protection register area, present in some flash 1013 * Method to access the protection register area, present in some flash
1002 * devices. The user data is one time programmable but the factory data is read 1014 * devices. The user data is one time programmable but the factory data is read