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
nexedi
linux
Commits
b3c93435
Commit
b3c93435
authored
Mar 23, 2003
by
Dave Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] bring sparc riowatchdog in sync with 2.4
+ C99 struct initialisers
parent
6a6ee575
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
2 deletions
+17
-2
drivers/sbus/char/riowatchdog.c
drivers/sbus/char/riowatchdog.c
+17
-2
No files found.
drivers/sbus/char/riowatchdog.c
View file @
b3c93435
/* $Id: riowatchdog.c,v 1.3
2001/10/08 22:19:51
davem Exp $
/* $Id: riowatchdog.c,v 1.3
.2.2 2002/01/23 18:48:02
davem Exp $
* riowatchdog.c - driver for hw watchdog inside Super I/O of RIO
* riowatchdog.c - driver for hw watchdog inside Super I/O of RIO
*
*
* Copyright (C) 2001 David S. Miller (davem@redhat.com)
* Copyright (C) 2001 David S. Miller (davem@redhat.com)
...
@@ -127,8 +127,11 @@ static int riowd_release(struct inode *inode, struct file *filp)
...
@@ -127,8 +127,11 @@ static int riowd_release(struct inode *inode, struct file *filp)
static
int
riowd_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
static
int
riowd_ioctl
(
struct
inode
*
inode
,
struct
file
*
filp
,
unsigned
int
cmd
,
unsigned
long
arg
)
unsigned
int
cmd
,
unsigned
long
arg
)
{
{
static
struct
watchdog_info
info
=
{
0
,
0
,
"Natl. Semiconductor PC97317"
};
static
struct
watchdog_info
info
=
{
WDIOF_SETTIMEOUT
,
0
,
"Natl. Semiconductor PC97317"
};
unsigned
int
options
;
unsigned
int
options
;
int
new_margin
;
switch
(
cmd
)
{
switch
(
cmd
)
{
case
WDIOC_GETSUPPORT
:
case
WDIOC_GETSUPPORT
:
...
@@ -159,6 +162,18 @@ static int riowd_ioctl(struct inode *inode, struct file *filp,
...
@@ -159,6 +162,18 @@ static int riowd_ioctl(struct inode *inode, struct file *filp,
break
;
break
;
case
WDIOC_SETTIMEOUT
:
if
(
get_user
(
new_margin
,
(
int
*
)
arg
))
return
-
EFAULT
;
if
((
new_margin
<
60
)
||
(
new_margin
>
(
255
*
60
)))
return
-
EINVAL
;
riowd_timeout
=
(
new_margin
+
59
)
/
60
;
riowd_pingtimer
();
/* Fall */
case
WDIOC_GETTIMEOUT
:
return
put_user
(
riowd_timeout
*
60
,
(
int
*
)
arg
);
default:
default:
return
-
EINVAL
;
return
-
EINVAL
;
};
};
...
...
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