aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/flash.c
diff options
context:
space:
mode:
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