Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 49137
b: refs/heads/master
c: 4f4fad2
h: refs/heads/master
i:
  49135: 050fce3
v: v3
  • Loading branch information
Kyungmin Park committed Feb 2, 2007
1 parent c31418f commit 1afe1ed
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a5e7c7b447270d42c3eb4d2259f74019aca9d007
refs/heads/master: 4f4fad27aceb87621d40f3068b94b5b11fc0127b
14 changes: 5 additions & 9 deletions trunk/drivers/mtd/onenand/onenand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,7 @@ static int onenand_transfer_auto_oob(struct mtd_info *mtd, uint8_t *buf, int col
readend += free->offset - lastgap;
lastgap = free->offset + free->length;
}
this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf + readcol,
readcol, readend - readcol);
this->read_bufferram(mtd, ONENAND_SPARERAM, oob_buf, 0, mtd->oobsize);
for (free = this->ecclayout->oobfree; free->length; ++free) {
int free_end = free->offset + free->length;
if (free->offset < readend && free_end > readcol) {
Expand Down Expand Up @@ -926,13 +925,12 @@ int onenand_do_read_oob(struct mtd_info *mtd, loff_t from, size_t len,
static int onenand_read_oob(struct mtd_info *mtd, loff_t from,
struct mtd_oob_ops *ops)
{
switch (ops->mode)
{
switch (ops->mode) {
case MTD_OOB_PLACE:
case MTD_OOB_AUTO:
break;
case MTD_OOB_RAW:
return -EINVAL; /* Not implemented yet */
/* Not implemented yet */
default:
return -EINVAL;
}
Expand Down Expand Up @@ -1143,7 +1141,6 @@ static int onenand_fill_auto_oob(struct mtd_info *mtd, u_char *oob_buf,
writeend += free->offset - lastgap;
lastgap = free->offset + free->length;
}
writeend = mtd->oobsize;
for (free = this->ecclayout->oobfree; free->length; ++free) {
int free_end = free->offset + free->length;
if (free->offset < writeend && free_end > writecol) {
Expand Down Expand Up @@ -1264,13 +1261,12 @@ static int onenand_do_write_oob(struct mtd_info *mtd, loff_t to, size_t len,
static int onenand_write_oob(struct mtd_info *mtd, loff_t to,
struct mtd_oob_ops *ops)
{
switch (ops->mode)
{
switch (ops->mode) {
case MTD_OOB_PLACE:
case MTD_OOB_AUTO:
break;
case MTD_OOB_RAW:
return -EINVAL; /* Not implemented yet */
/* Not implemented yet */
default:
return -EINVAL;
}
Expand Down

0 comments on commit 1afe1ed

Please sign in to comment.