diff options
Diffstat (limited to 'drivers/mtd/chips/cfi_cmdset_0020.c')
-rw-r--r-- | drivers/mtd/chips/cfi_cmdset_0020.c | 13 |
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; |