diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-14 10:16:15 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2013-02-14 10:16:17 +0100 |
commit | 3930f38028fb8307097ced49ed034ca981b64873 (patch) | |
tree | d5e2f0be87511b9220410ffcfa4ce63938b8450e /lib/libmtd.c | |
parent | a40e76cebcbe8b025bafdefdc6e27b7553209ed7 (diff) | |
download | barebox-3930f38028fb8307097ced49ed034ca981b64873.tar.gz barebox-3930f38028fb8307097ced49ed034ca981b64873.tar.xz |
libmtd: rename functions from mtd_* to libmtd_*
The kernel nowadays has mtd_read/write and other functions. In
barebox we also have these functions, but with a different prototype,
namely they correspond to the libmtd userspace functions. Rename
these functions to libmtd_* to avoid name clashes with future mtd
updates.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/libmtd.c')
-rw-r--r-- | lib/libmtd.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libmtd.c b/lib/libmtd.c index 8c4152eb79..eecc760548 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; |