Commit 799e4907 authored by Linus Torvalds's avatar Linus Torvalds

mips: fix up some straggling sysctl functions

parent a5b62ecb
...@@ -60,11 +60,11 @@ int sysctl_lasatstring(ctl_table *table, int *name, int nlen, ...@@ -60,11 +60,11 @@ int sysctl_lasatstring(ctl_table *table, int *name, int nlen,
/* And the same for proc */ /* And the same for proc */
int proc_dolasatstring(ctl_table *table, int write, struct file *filp, int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp) void *buffer, size_t *lenp, loff_t *ppos)
{ {
int r; int r;
down(&lasat_info_sem); down(&lasat_info_sem);
r = proc_dostring(table, write, filp, buffer, lenp); r = proc_dostring(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) { if ( (!write) || r) {
up(&lasat_info_sem); up(&lasat_info_sem);
return r; return r;
...@@ -76,11 +76,11 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp, ...@@ -76,11 +76,11 @@ int proc_dolasatstring(ctl_table *table, int write, struct file *filp,
/* proc function to write EEPROM after changing int entry */ /* proc function to write EEPROM after changing int entry */
int proc_dolasatint(ctl_table *table, int write, struct file *filp, int proc_dolasatint(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp) void *buffer, size_t *lenp, loff_t *ppos)
{ {
int r; int r;
down(&lasat_info_sem); down(&lasat_info_sem);
r = proc_dointvec(table, write, filp, buffer, lenp); r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) { if ( (!write) || r) {
up(&lasat_info_sem); up(&lasat_info_sem);
return r; return r;
...@@ -95,7 +95,7 @@ static int rtctmp; ...@@ -95,7 +95,7 @@ static int rtctmp;
#ifdef CONFIG_DS1603 #ifdef CONFIG_DS1603
/* proc function to read/write RealTime Clock */ /* proc function to read/write RealTime Clock */
int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp) void *buffer, size_t *lenp, loff_t *ppos)
{ {
int r; int r;
down(&lasat_info_sem); down(&lasat_info_sem);
...@@ -105,7 +105,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp, ...@@ -105,7 +105,7 @@ int proc_dolasatrtc(ctl_table *table, int write, struct file *filp,
if (rtctmp < 0) if (rtctmp < 0)
rtctmp = 0; rtctmp = 0;
} }
r = proc_dointvec(table, write, filp, buffer, lenp); r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) { if ( (!write) || r) {
up(&lasat_info_sem); up(&lasat_info_sem);
return r; return r;
...@@ -180,14 +180,14 @@ void update_bcastaddr(void) ...@@ -180,14 +180,14 @@ void update_bcastaddr(void)
static char proc_lasat_ipbuf[32]; static char proc_lasat_ipbuf[32];
/* Parsing of IP address */ /* Parsing of IP address */
int proc_lasat_ip(ctl_table *table, int write, struct file *filp, int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp) void *buffer, size_t *lenp, loff_t *ppos)
{ {
int len; int len;
unsigned int ip; unsigned int ip;
char *p, c; char *p, c;
if (!table->data || !table->maxlen || !*lenp || if (!table->data || !table->maxlen || !*lenp ||
(filp->f_pos && !write)) { (*ppos && !write)) {
*lenp = 0; *lenp = 0;
return 0; return 0;
} }
...@@ -213,7 +213,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, ...@@ -213,7 +213,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
return -EFAULT; return -EFAULT;
} }
proc_lasat_ipbuf[len] = 0; proc_lasat_ipbuf[len] = 0;
filp->f_pos += *lenp; *ppos += *lenp;
/* Now see if we can convert it to a valid IP */ /* Now see if we can convert it to a valid IP */
ip = in_aton(proc_lasat_ipbuf); ip = in_aton(proc_lasat_ipbuf);
*(unsigned int *)(table->data) = ip; *(unsigned int *)(table->data) = ip;
...@@ -241,7 +241,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp, ...@@ -241,7 +241,7 @@ int proc_lasat_ip(ctl_table *table, int write, struct file *filp,
len++; len++;
} }
*lenp = len; *lenp = len;
filp->f_pos += len; *ppos += len;
} }
update_bcastaddr(); update_bcastaddr();
up(&lasat_info_sem); up(&lasat_info_sem);
...@@ -277,11 +277,11 @@ static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen, ...@@ -277,11 +277,11 @@ static int sysctl_lasat_eeprom_value(ctl_table *table, int *name, int nlen,
} }
int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp, int proc_lasat_eeprom_value(ctl_table *table, int write, struct file *filp,
void *buffer, size_t *lenp) void *buffer, size_t *lenp, loff_t *ppos)
{ {
int r; int r;
down(&lasat_info_sem); down(&lasat_info_sem);
r = proc_dointvec(table, write, filp, buffer, lenp); r = proc_dointvec(table, write, filp, buffer, lenp, ppos);
if ( (!write) || r) { if ( (!write) || r) {
up(&lasat_info_sem); up(&lasat_info_sem);
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment