Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
799e4907
Commit
799e4907
authored
Aug 09, 2004
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mips: fix up some straggling sysctl functions
parent
a5b62ecb
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
arch/mips/lasat/sysctl.c
arch/mips/lasat/sysctl.c
+12
-12
No files found.
arch/mips/lasat/sysctl.c
View file @
799e4907
...
@@ -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
))
{
(
*
p
pos
&&
!
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
;
*
p
pos
+=
*
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
;
*
p
pos
+=
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment