Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24835
b: refs/heads/master
c: 040d79f
h: refs/heads/master
i:
  24833: 128b32a
  24831: f349d84
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Mar 31, 2006
1 parent 16e0274 commit 280a739
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 37466ea85a7f7c9eef071a334e074265df4d1305
refs/heads/master: 040d79f906654d55c810313f29c6605593bf21c5
7 changes: 4 additions & 3 deletions trunk/drivers/mtd/devices/doc2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include <linux/init.h>
#include <linux/types.h>
#include <linux/bitops.h>
#include <linux/mutex.h>

#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
Expand Down Expand Up @@ -975,13 +976,13 @@ static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
u_char *eccbuf, struct nand_oobinfo *oobsel)
{
static char static_buf[512];
static DECLARE_MUTEX(writev_buf_sem);
static DEFINE_MUTEX(writev_buf_mutex);

size_t totretlen = 0;
size_t thisvecofs = 0;
int ret= 0;

down(&writev_buf_sem);
mutex_lock(&writev_buf_mutex);

while(count) {
size_t thislen, thisretlen;
Expand Down Expand Up @@ -1024,7 +1025,7 @@ static int doc_writev_ecc(struct mtd_info *mtd, const struct kvec *vecs,
to += thislen;
}

up(&writev_buf_sem);
mutex_unlock(&writev_buf_mutex);
*retlen = totretlen;
return ret;
}
Expand Down

0 comments on commit 280a739

Please sign in to comment.