aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/flash.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 16:34:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-19 16:34:20 -0400
commit711f77f53c5ff6aa61dbe8e5f518e50d6306e89d (patch)
tree93bc99051b26586916a628b1a276543085f80ff2 /drivers/sbus/char/flash.c
parent024a6b95181f2df6090975c8a293499d24bf8b28 (diff)
parent273fca0ecad9305247043815e185d1bfd04047d4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: sparc: Define ARCH_SLAB_MINALIGN drivers/sbus/char/flash.c: flash_read should update ppos instead of file->f_pos sparc64: Fix stack dumping and tracing when function graph is enabled. sparc64: Show stack backtrace from show_regs() just like other platforms.
Diffstat (limited to 'drivers/sbus/char/flash.c')
-rw-r--r--drivers/sbus/char/flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/sbus/char/flash.c b/drivers/sbus/char/flash.c
index 19f255b97c86..d3b62eb0fba7 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -105,9 +105,9 @@ static ssize_t
105flash_read(struct file * file, char __user * buf, 105flash_read(struct file * file, char __user * buf,
106 size_t count, loff_t *ppos) 106 size_t count, loff_t *ppos)
107{ 107{
108 unsigned long p = file->f_pos; 108 loff_t p = *ppos;
109 int i; 109 int i;
110 110
111 if (count > flash.read_size - p) 111 if (count > flash.read_size - p)
112 count = flash.read_size - p; 112 count = flash.read_size - p;
113 113
@@ -118,7 +118,7 @@ flash_read(struct file * file, char __user * buf,
118 buf++; 118 buf++;
119 } 119 }
120 120
121 file->f_pos += count; 121 *ppos += count;
122 return count; 122 return count;
123} 123}
124 124