aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/chips/cfi_cmdset_0020.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 16:45:22 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-10 16:45:22 -0500
commit7b3480f8b701170c046e1ed362946f5f0d005e13 (patch)
treebd25e05b4f35699689b485480dddf24f840f80af /drivers/mtd/chips/cfi_cmdset_0020.c
parent1c8106528aa6bf16b3f457de80df1cf7462a49a4 (diff)
parentb60ef99c1164a8ad346cf41f9e71acfffb6d25a6 (diff)
Merge tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6
MTD pull for 3.3 * tag 'for-linus-3.3' of git://git.infradead.org/mtd-2.6: (113 commits) mtd: Fix dependency for MTD_DOC200x mtd: do not use mtd->block_markbad directly logfs: do not use 'mtd->block_isbad' directly mtd: introduce mtd_can_have_bb helper mtd: do not use mtd->suspend and mtd->resume directly mtd: do not use mtd->lock, unlock and is_locked directly mtd: do not use mtd->sync directly mtd: harmonize mtd_writev usage mtd: do not use mtd->lock_user_prot_reg directly mtd: mtd->write_user_prot_reg directly mtd: do not use mtd->read_*_prot_reg directly mtd: do not use mtd->get_*_prot_info directly mtd: do not use mtd->read_oob directly mtd: mtdoops: do not use mtd->panic_write directly romfs: do not use mtd->get_unmapped_area directly mtd: do not use mtd->get_unmapped_area directly mtd: do use mtd->point directly mtd: introduce mtd_has_oob helper mtd: mtdcore: export symbols cleanup mtd: clean-up the default_mtd_writev function ... Fix up trivial edit/remove conflict in drivers/staging/spectra/lld_mtd.c
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0020.c')
-rw-r--r--drivers/mtd/chips/cfi_cmdset_0020.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
index 179814a95f3a..85e80180b65b 100644
--- a/drivers/mtd/chips/cfi_cmdset_0020.c
+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
@@ -139,8 +139,9 @@ struct mtd_info *cfi_cmdset_0020(struct map_info *map, int primary)
139 } 139 }
140 140
141 /* Do some byteswapping if necessary */ 141 /* Do some byteswapping if necessary */
142 extp->FeatureSupport = cfi32_to_cpu(extp->FeatureSupport); 142 extp->FeatureSupport = cfi32_to_cpu(map, extp->FeatureSupport);
143 extp->BlkStatusRegMask = cfi32_to_cpu(extp->BlkStatusRegMask); 143 extp->BlkStatusRegMask = cfi32_to_cpu(map,
144 extp->BlkStatusRegMask);
144 145
145#ifdef DEBUG_CFI_FEATURES 146#ifdef DEBUG_CFI_FEATURES
146 /* Tell the user about it in lots of lovely detail */ 147 /* Tell the user about it in lots of lovely detail */
@@ -698,7 +699,8 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs,
698 continue; 699 continue;
699 } 700 }
700 memcpy(buffer+buflen, elem_base, ECCBUF_SIZE-buflen); 701 memcpy(buffer+buflen, elem_base, ECCBUF_SIZE-buflen);
701 ret = mtd->write(mtd, to, ECCBUF_SIZE, &thislen, buffer); 702 ret = mtd_write(mtd, to, ECCBUF_SIZE, &thislen,
703 buffer);
702 totlen += thislen; 704 totlen += thislen;
703 if (ret || thislen != ECCBUF_SIZE) 705 if (ret || thislen != ECCBUF_SIZE)
704 goto write_error; 706 goto write_error;
@@ -707,7 +709,8 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs,
707 to += ECCBUF_SIZE; 709 to += ECCBUF_SIZE;
708 } 710 }
709 if (ECCBUF_DIV(elem_len)) { /* write clean aligned data */ 711 if (ECCBUF_DIV(elem_len)) { /* write clean aligned data */
710 ret = mtd->write(mtd, to, ECCBUF_DIV(elem_len), &thislen, elem_base); 712 ret = mtd_write(mtd, to, ECCBUF_DIV(elem_len),
713 &thislen, elem_base);
711 totlen += thislen; 714 totlen += thislen;
712 if (ret || thislen != ECCBUF_DIV(elem_len)) 715 if (ret || thislen != ECCBUF_DIV(elem_len))
713 goto write_error; 716 goto write_error;
@@ -721,7 +724,7 @@ cfi_staa_writev(struct mtd_info *mtd, const struct kvec *vecs,
721 } 724 }
722 if (buflen) { /* flush last page, even if not full */ 725 if (buflen) { /* flush last page, even if not full */
723 /* This is sometimes intended behaviour, really */ 726 /* This is sometimes intended behaviour, really */
724 ret = mtd->write(mtd, to, buflen, &thislen, buffer); 727 ret = mtd_write(mtd, to, buflen, &thislen, buffer);
725 totlen += thislen; 728 totlen += thislen;
726 if (ret || thislen != ECCBUF_SIZE) 729 if (ret || thislen != ECCBUF_SIZE)
727 goto write_error; 730 goto write_error;