Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4491
b: refs/heads/master
c: 332d71f
h: refs/heads/master
i:
  4489: 5b2ffee
  4487: fdef3b5
v: v3
  • Loading branch information
Nicolas Pitre authored and Thomas Gleixner committed May 23, 2005
1 parent ba6e227 commit 0dc775d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 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: b81226c5d55b16a23f044d37b45e9b6909d8fbce
refs/heads/master: 332d71f7682d860b4439e197bc0ae85867458e1b
8 changes: 5 additions & 3 deletions trunk/drivers/mtd/chips/cfi_cmdset_0001.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
*
* (C) 2000 Red Hat. GPL'd
*
* $Id: cfi_cmdset_0001.c,v 1.167 2005/02/08 17:11:15 nico Exp $
* $Id: cfi_cmdset_0001.c,v 1.168 2005/02/17 20:34:59 nico Exp $
*
*
* 10/10/2000 Nicolas Pitre <nico@cam.org>
Expand Down Expand Up @@ -2025,7 +2025,7 @@ do_otp_lock(struct map_info *map, struct flchip *chip, u_long offset,
map_word datum;

/* make sure area matches group boundaries */
if (offset != 0 || size != grpsz)
if (size != grpsz)
return -EXDEV;

datum = map_word_ff(map);
Expand Down Expand Up @@ -2089,7 +2089,7 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
groupno = 0;
}

while (groups > 0) {
while (len > 0 && groups > 0) {
if (!action) {
/*
* Special case: if action is NULL
Expand Down Expand Up @@ -2118,6 +2118,7 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
*retlen += sizeof(*otpinfo);
} else if (from >= groupsize) {
from -= groupsize;
data_offset += groupsize;
} else {
int size = groupsize;
data_offset += from;
Expand All @@ -2133,6 +2134,7 @@ static int cfi_intelext_otp_walk(struct mtd_info *mtd, loff_t from, size_t len,
buf += size;
len -= size;
*retlen += size;
data_offset += size;
}
groupno++;
groups--;
Expand Down

0 comments on commit 0dc775d

Please sign in to comment.