aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr
diff options
context:
space:
mode:
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2012-02-06 05:39:07 -0500
committerDavid Woodhouse <David.Woodhouse@intel.com>2012-03-26 19:29:34 -0400
commit834247ec7e281dee839fe4a04bc1bbf0c7395172 (patch)
treec037c578ba572d9104a2341013acde044a8ca052 /drivers/mtd/lpddr
parent664addc248d2fed68d013d26ff2fc796d7134259 (diff)
mtd: remove retlen zeroing duplication
The MTD API function now zero the 'retlen' parameter before calling the driver's method — do not do this again in drivers. This removes duplicated '*retlen = 0' assignent from the following methods: 'mtd_point()' 'mtd_read()' 'mtd_write()' 'mtd_writev()' 'mtd_panic_write()' Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r--drivers/mtd/lpddr/lpddr_cmds.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index 0f3731c6b3f6..a92906ba535d 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -535,9 +535,7 @@ static int lpddr_point(struct mtd_info *mtd, loff_t adr, size_t len,
535 535
536 /* ofs: offset within the first chip that the first read should start */ 536 /* ofs: offset within the first chip that the first read should start */
537 ofs = adr - (chipnum << lpddr->chipshift); 537 ofs = adr - (chipnum << lpddr->chipshift);
538
539 *mtdbuf = (void *)map->virt + chip->start + ofs; 538 *mtdbuf = (void *)map->virt + chip->start + ofs;
540 *retlen = 0;
541 539
542 while (len) { 540 while (len) {
543 unsigned long thislen; 541 unsigned long thislen;
@@ -647,7 +645,6 @@ static int lpddr_writev(struct mtd_info *mtd, const struct kvec *vecs,
647 for (i = 0; i < count; i++) 645 for (i = 0; i < count; i++)
648 len += vecs[i].iov_len; 646 len += vecs[i].iov_len;
649 647
650 *retlen = 0;
651 if (!len) 648 if (!len)
652 return 0; 649 return 0;
653 650