diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:49 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-03-04 09:21:49 +0100 |
commit | 62ee96bd3b5e02173c0d9956c4f1e1a4de8f940d (patch) | |
tree | 1c9d519fb35c8c599bb31c4ee836f3ac135d933d /lib | |
parent | 13408877f4c0d4b2784d3388dd4481369205e46a (diff) | |
parent | ef06284cd947c4e90a54a62d2c106789c6eaebe8 (diff) | |
download | barebox-62ee96bd3b5e02173c0d9956c4f1e1a4de8f940d.tar.gz barebox-62ee96bd3b5e02173c0d9956c4f1e1a4de8f940d.tar.xz |
Merge branch 'for-next/mtd'
Conflicts:
arch/arm/configs/eukrea_cpuimx27_defconfig
drivers/mtd/core.c
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libmtd.c | 14 | ||||
-rw-r--r-- | lib/libscan.c | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/lib/libmtd.c b/lib/libmtd.c index 8c4152eb7..eecc76054 100644 --- a/lib/libmtd.c +++ b/lib/libmtd.c @@ -56,7 +56,7 @@ static int mtd_valid_erase_block(const struct mtd_dev_info *mtd, int eb) return 0; } -int mtd_erase(const struct mtd_dev_info *mtd, int fd, int eb) +int libmtd_erase(const struct mtd_dev_info *mtd, int fd, int eb) { int ret; struct erase_info_user ei; @@ -107,12 +107,12 @@ int mtd_torture(const struct mtd_dev_info *mtd, int fd, int eb) buf = xmalloc(mtd->eb_size); for (i = 0; i < patt_count; i++) { - err = mtd_erase(mtd, fd, eb); + err = libmtd_erase(mtd, fd, eb); if (err) goto out; /* Make sure the PEB contains only 0xFF bytes */ - err = mtd_read(mtd, fd, eb, 0, buf, mtd->eb_size); + err = libmtd_read(mtd, fd, eb, 0, buf, mtd->eb_size); if (err) goto out; @@ -125,12 +125,12 @@ int mtd_torture(const struct mtd_dev_info *mtd, int fd, int eb) /* Write a pattern and check it */ memset(buf, patterns[i], mtd->eb_size); - err = mtd_write(mtd, fd, eb, 0, buf, mtd->eb_size); + err = libmtd_write(mtd, fd, eb, 0, buf, mtd->eb_size); if (err) goto out; memset(buf, ~patterns[i], mtd->eb_size); - err = mtd_read(mtd, fd, eb, 0, buf, mtd->eb_size); + err = libmtd_read(mtd, fd, eb, 0, buf, mtd->eb_size); if (err) goto out; @@ -191,7 +191,7 @@ int mtd_mark_bad(const struct mtd_dev_info *mtd, int fd, int eb) return 0; } -int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs, +int libmtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs, void *buf, int len) { int ret, rd = 0; @@ -225,7 +225,7 @@ int mtd_read(const struct mtd_dev_info *mtd, int fd, int eb, int offs, return 0; } -int mtd_write(const struct mtd_dev_info *mtd, int fd, int eb, int offs, +int libmtd_write(const struct mtd_dev_info *mtd, int fd, int eb, int offs, void *buf, int len) { int ret; diff --git a/lib/libscan.c b/lib/libscan.c index af55269ec..c59acfa61 100644 --- a/lib/libscan.c +++ b/lib/libscan.c @@ -90,7 +90,7 @@ int libscan_ubi_scan(struct mtd_dev_info *mtd, int fd, struct ubi_scan_info **in continue; } - ret = mtd_read(mtd, fd, eb, 0, &ech, sizeof(struct ubi_ec_hdr)); + ret = libmtd_read(mtd, fd, eb, 0, &ech, sizeof(struct ubi_ec_hdr)); if (ret < 0) goto out_ec; |