Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 332673
b: refs/heads/master
c: d76236f
h: refs/heads/master
i:
  332671: 98c4c07
v: v3
  • Loading branch information
Bastian Hecht authored and David Woodhouse committed Sep 29, 2012
1 parent 706dd14 commit 141d233
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 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: 2361f738b67ab7f1152187fa3d321a09b7c95c09
refs/heads/master: d76236f30f1280f9345bb266a161e3ba60518c83
13 changes: 7 additions & 6 deletions trunk/drivers/mtd/nand/sh_flctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/slab.h>
#include <linux/string.h>

#include <linux/mtd/mtd.h>
#include <linux/mtd/nand.h>
Expand Down Expand Up @@ -746,10 +747,9 @@ static void flctl_select_chip(struct mtd_info *mtd, int chipnr)
static void flctl_write_buf(struct mtd_info *mtd, const uint8_t *buf, int len)
{
struct sh_flctl *flctl = mtd_to_flctl(mtd);
int i, index = flctl->index;
int index = flctl->index;

for (i = 0; i < len; i++)
flctl->done_buff[index + i] = buf[i];
memcpy(&flctl->done_buff[index], buf, len);
flctl->index += len;
}

Expand Down Expand Up @@ -778,10 +778,11 @@ static uint16_t flctl_read_word(struct mtd_info *mtd)

static void flctl_read_buf(struct mtd_info *mtd, uint8_t *buf, int len)
{
int i;
struct sh_flctl *flctl = mtd_to_flctl(mtd);
int index = flctl->index;

for (i = 0; i < len; i++)
buf[i] = flctl_read_byte(mtd);
memcpy(buf, &flctl->done_buff[index], len);
flctl->index += len;
}

static int flctl_verify_buf(struct mtd_info *mtd, const u_char *buf, int len)
Expand Down

0 comments on commit 141d233

Please sign in to comment.