diff options
author | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-28 05:01:53 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@cruncher.tec.linutronix.de> | 2006-05-29 09:06:50 -0400 |
commit | f4a43cfcecfcaeeaa40a9dbc1d1378298c22446e (patch) | |
tree | 5647ebccb720c9d8ca314c8a3a5f6a660d000019 /drivers/mtd/mtdchar.c | |
parent | 5bd34c091a044d130601370c370f84b1c59f1627 (diff) |
[MTD] Remove silly MTD_WRITE/READ macros
Most of those macros are unused and the used ones just obfuscate
the code. Remove them and fixup all users.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/mtd/mtdchar.c')
-rw-r--r-- | drivers/mtd/mtdchar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/mtdchar.c b/drivers/mtd/mtdchar.c index e75ec5fe7760..b45e7747daa3 100644 --- a/drivers/mtd/mtdchar.c +++ b/drivers/mtd/mtdchar.c | |||
@@ -194,7 +194,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t | |||
194 | ret = mtd->read_user_prot_reg(mtd, *ppos, len, &retlen, kbuf); | 194 | ret = mtd->read_user_prot_reg(mtd, *ppos, len, &retlen, kbuf); |
195 | break; | 195 | break; |
196 | default: | 196 | default: |
197 | ret = MTD_READ(mtd, *ppos, len, &retlen, kbuf); | 197 | ret = mtd->read(mtd, *ppos, len, &retlen, kbuf); |
198 | } | 198 | } |
199 | /* Nand returns -EBADMSG on ecc errors, but it returns | 199 | /* Nand returns -EBADMSG on ecc errors, but it returns |
200 | * the data. For our userspace tools it is important | 200 | * the data. For our userspace tools it is important |
@@ -205,7 +205,7 @@ static ssize_t mtd_read(struct file *file, char __user *buf, size_t count,loff_t | |||
205 | if (!ret || (ret == -EBADMSG)) { | 205 | if (!ret || (ret == -EBADMSG)) { |
206 | *ppos += retlen; | 206 | *ppos += retlen; |
207 | if (copy_to_user(buf, kbuf, retlen)) { | 207 | if (copy_to_user(buf, kbuf, retlen)) { |
208 | kfree(kbuf); | 208 | kfree(kbuf); |
209 | return -EFAULT; | 209 | return -EFAULT; |
210 | } | 210 | } |
211 | else | 211 | else |