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
cbe6ef3a
Commit
cbe6ef3a
authored
Jan 14, 2003
by
Dave Jones
Committed by
Dave Jones
Jan 14, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WATCHDOG] Final 2.4 changes for wdt285.c
parent
0c51c007
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
drivers/char/watchdog/wdt285.c
drivers/char/watchdog/wdt285.c
+19
-3
No files found.
drivers/char/watchdog/wdt285.c
View file @
cbe6ef3a
...
...
@@ -123,10 +123,10 @@ static ssize_t watchdog_write(struct file *file, const char *data, size_t len, l
static
int
watchdog_ioctl
(
struct
inode
*
inode
,
struct
file
*
file
,
unsigned
int
cmd
,
unsigned
long
arg
)
{
int
i
;
int
i
,
new_margin
;
static
struct
watchdog_info
ident
=
{
0
,
WDIOF_SETTIMEOUT
,
0
,
"Footbridge Watchdog"
};
...
...
@@ -144,6 +144,17 @@ static int watchdog_ioctl(struct inode *inode, struct file *file,
case
WDIOC_KEEPALIVE
:
watchdog_ping
();
return
0
;
case
WDIOC_SETTIMEOUT
:
if
(
get_user
(
new_margin
,
(
int
*
)
arg
))
return
-
EFAULT
;
/* Arbitrary, can't find the card's limits */
if
((
new_marg
<
0
)
||
(
new_margin
>
60
))
return
-
EINVAL
;
soft_margin
=
new_margin
;
watchdog_ping
();
/* Fall */
case
WDIOC_GETTIMEOUT
:
return
put_user
(
soft_margin
,
(
int
*
)
arg
);
}
}
...
...
@@ -165,10 +176,15 @@ static struct miscdevice watchdog_miscdev=
static
int
__init
footbridge_watchdog_init
(
void
)
{
int
retval
;
if
(
machine_is_netwinder
())
return
-
ENODEV
;
misc_register
(
&
watchdog_miscdev
);
retval
=
misc_register
(
&
watchdog_miscdev
);
if
(
retval
<
0
)
return
retval
;
printk
(
"Footbridge Watchdog Timer: 0.01, timer margin: %d sec
\n
"
,
soft_margin
);
if
(
machine_is_cats
())
...
...
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