Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 274925
b: refs/heads/master
c: 305b93f
h: refs/heads/master
i:
  274923: 87432d4
v: v3
  • Loading branch information
Brian Norris authored and Artem Bityutskiy committed Sep 11, 2011
1 parent 118ffe6 commit b271987
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 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: c97926dd8d7cc094830b253afc817cbf406c0de7
refs/heads/master: 305b93f180b221789a6213bf3d298c6735102da1
8 changes: 4 additions & 4 deletions trunk/drivers/mtd/mtdchar.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ static int mtd_do_writeoob(struct file *file, struct mtd_info *mtd,
return ret;

ops.ooblen = length;
ops.ooboffs = start & (mtd->oobsize - 1);
ops.ooboffs = start & (mtd->writesize - 1);
ops.datbuf = NULL;
ops.mode = MTD_OOB_PLACE;

Expand All @@ -421,7 +421,7 @@ static int mtd_do_writeoob(struct file *file, struct mtd_info *mtd,
if (IS_ERR(ops.oobbuf))
return PTR_ERR(ops.oobbuf);

start &= ~((uint64_t)mtd->oobsize - 1);
start &= ~((uint64_t)mtd->writesize - 1);
ret = mtd->write_oob(mtd, start, &ops);

if (ops.oobretlen > 0xFFFFFFFFU)
Expand Down Expand Up @@ -452,7 +452,7 @@ static int mtd_do_readoob(struct mtd_info *mtd, uint64_t start,
return ret;

ops.ooblen = length;
ops.ooboffs = start & (mtd->oobsize - 1);
ops.ooboffs = start & (mtd->writesize - 1);
ops.datbuf = NULL;
ops.mode = MTD_OOB_PLACE;

Expand All @@ -463,7 +463,7 @@ static int mtd_do_readoob(struct mtd_info *mtd, uint64_t start,
if (!ops.oobbuf)
return -ENOMEM;

start &= ~((uint64_t)mtd->oobsize - 1);
start &= ~((uint64_t)mtd->writesize - 1);
ret = mtd->read_oob(mtd, start, &ops);

if (put_user(ops.oobretlen, retp))
Expand Down

0 comments on commit b271987

Please sign in to comment.