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) {
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;
}
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) {
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;
}