[PATCH 74/133] [Jaunty SRU] ARM.imx51 Freescale:ENGR00112201 mtd: export nand_do_read/write_ops functions
Brad Figg
brad.figg at canonical.com
Thu Jul 9 16:49:04 UTC 2009
From: Rob Herring <r.herring at freescale.com>
mtd: export nand_do_read/write_ops functions
Signed-off-by: Rob Herring <r.herring at freescale.com>
Signed-off-by: Brad Figg <brad.figg at canonical.com>
---
drivers/mtd/nand/nand_base.c | 7 +++++--
include/linux/mtd/nand.h | 5 ++++-
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/mtd/nand/nand_base.c b/drivers/mtd/nand/nand_base.c
index 0a9c9cd..3621636 100644
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -1033,7 +1033,7 @@ static uint8_t *nand_transfer_oob(struct nand_chip *chip, uint8_t *oob,
*
* Internal function. Called with chip held.
*/
-static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
+int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
struct mtd_oob_ops *ops)
{
int chipnr, page, realpage, col, bytes, aligned;
@@ -1161,6 +1161,7 @@ static int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
return mtd->ecc_stats.corrected - stats.corrected ? -EUCLEAN : 0;
}
+EXPORT_SYMBOL(nand_do_read_ops);
/**
* nand_read - [MTD Interface] MTD compability function for nand_do_read_ecc
@@ -1703,7 +1704,7 @@ static uint8_t *nand_fill_oob(struct nand_chip *chip, uint8_t *oob,
*
* NAND write with ECC
*/
-static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
+int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
struct mtd_oob_ops *ops)
{
int chipnr, realpage, page, blockmask, column;
@@ -1795,6 +1796,7 @@ static int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
ops->oobretlen = ops->ooblen;
return ret;
}
+EXPORT_SYMBOL(nand_do_write_ops);
/**
* nand_write - [MTD Interface] NAND write with ECC
@@ -2181,6 +2183,7 @@ int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
/* Return more or less happy */
return ret;
}
+EXPORT_SYMBOL_GPL(nand_erase_nand);
/**
* nand_sync - [MTD Interface] sync
diff --git a/include/linux/mtd/nand.h b/include/linux/mtd/nand.h
index 733d3f3..1912972 100644
--- a/include/linux/mtd/nand.h
+++ b/include/linux/mtd/nand.h
@@ -551,7 +551,10 @@ extern int nand_erase_nand(struct mtd_info *mtd, struct erase_info *instr,
int allowbbt);
extern int nand_do_read(struct mtd_info *mtd, loff_t from, size_t len,
size_t * retlen, uint8_t * buf);
-
+extern int nand_do_read_ops(struct mtd_info *mtd, loff_t from,
+ struct mtd_oob_ops *ops);
+extern int nand_do_write_ops(struct mtd_info *mtd, loff_t to,
+ struct mtd_oob_ops *ops);
/*
* Constants for oob configuration
*/
--
1.6.0.4
More information about the kernel-team
mailing list