aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/onenand/samsung.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/mtd/onenand/samsung.c b/drivers/mtd/onenand/samsung.c
index cb443af3d45f..094dfcbe2347 100644
--- a/drivers/mtd/onenand/samsung.c
+++ b/drivers/mtd/onenand/samsung.c
@@ -571,13 +571,12 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
571 unsigned char *buffer, int offset, size_t count) 571 unsigned char *buffer, int offset, size_t count)
572{ 572{
573 struct onenand_chip *this = mtd->priv; 573 struct onenand_chip *this = mtd->priv;
574 void __iomem *bufferram;
575 void __iomem *p; 574 void __iomem *p;
576 void *buf = (void *) buffer; 575 void *buf = (void *) buffer;
577 dma_addr_t dma_src, dma_dst; 576 dma_addr_t dma_src, dma_dst;
578 int err; 577 int err;
579 578
580 p = bufferram = this->base + area; 579 p = this->base + area;
581 if (ONENAND_CURRENT_BUFFERRAM(this)) { 580 if (ONENAND_CURRENT_BUFFERRAM(this)) {
582 if (area == ONENAND_DATARAM) 581 if (area == ONENAND_DATARAM)
583 p += this->writesize; 582 p += this->writesize;
@@ -621,7 +620,7 @@ static int s5pc110_read_bufferram(struct mtd_info *mtd, int area,
621normal: 620normal:
622 if (count != mtd->writesize) { 621 if (count != mtd->writesize) {
623 /* Copy the bufferram to memory to prevent unaligned access */ 622 /* Copy the bufferram to memory to prevent unaligned access */
624 memcpy(this->page_buf, bufferram, mtd->writesize); 623 memcpy(this->page_buf, p, mtd->writesize);
625 p = this->page_buf + offset; 624 p = this->page_buf + offset;
626 } 625 }
627 626