summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 19f255b97c8..d3b62eb0fba 100644
--- a/drivers/sbus/char/flash.c
+++ b/drivers/sbus/char/flash.c
@@ -105,9 +105,9 @@ static ssize_t
flash_read(struct file * file, char __user * buf,
size_t count, loff_t *ppos)
{
- unsigned long p = file->f_pos;
+ loff_t p = *ppos;
int i;
-
+
if (count > flash.read_size - p)
count = flash.read_size - p;
@@ -118,7 +118,7 @@ flash_read(struct file * file, char __user * buf,
buf++;
}
- file->f_pos += count;
+ *ppos += count;
return count;
}