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
6cb263df
Commit
6cb263df
authored
Jan 03, 2004
by
Wim Van Sebroeck
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WATCHDOG] 2.6.0-rc1 amd7xx_tco.module_param.patch
Made nowayout a module_parameter
parent
792d0cea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
13 deletions
+23
-13
drivers/char/watchdog/amd7xx_tco.c
drivers/char/watchdog/amd7xx_tco.c
+23
-13
No files found.
drivers/char/watchdog/amd7xx_tco.c
View file @
6cb263df
...
...
@@ -19,6 +19,7 @@
#include <linux/config.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
#include <linux/miscdevice.h>
#include <linux/watchdog.h>
...
...
@@ -59,9 +60,18 @@ static struct semaphore open_sem;
static
spinlock_t
amdtco_lock
;
/* only for device access */
static
char
expect_close
;
MODULE_PARM
(
timeout
,
"i"
);
module_param
(
timeout
,
int
,
0
);
MODULE_PARM_DESC
(
timeout
,
"range is 0-38 seconds, default is 38"
);
#ifdef CONFIG_WATCHDOG_NOWAYOUT
static
int
nowayout
=
1
;
#else
static
int
nowayout
=
0
;
#endif
module_param
(
nowayout
,
int
,
0
);
MODULE_PARM_DESC
(
nowayout
,
"Watchdog cannot be stopped once started (default=CONFIG_WATCHDOG_NOWAYOUT)"
);
static
inline
u8
seconds_to_ticks
(
int
seconds
)
{
/* the internal timer is stored as ticks which decrement
...
...
@@ -243,19 +253,19 @@ static ssize_t amdtco_fop_write(struct file *file, const char *data, size_t len,
return
-
ESPIPE
;
if
(
len
)
{
#ifndef CONFIG_WATCHDOG_NOWAYOUT
size_t
i
;
char
c
;
expect_close
=
0
;
for
(
i
=
0
;
i
!=
len
;
i
++
)
{
if
(
get_user
(
c
,
data
+
i
))
return
-
EFAULT
;
if
(
c
==
'V'
)
expect_close
=
42
;
if
(
!
nowayout
)
size_t
i
;
char
c
;
expect_close
=
0
;
for
(
i
=
0
;
i
!=
len
;
i
++
)
{
if
(
get_user
(
c
,
data
+
i
))
return
-
EFAULT
;
if
(
c
==
'V'
)
expect_close
=
42
;
}
}
#endif
amdtco_ping
();
}
...
...
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