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
44342733
Commit
44342733
authored
Jan 10, 2003
by
Dave Jones
Committed by
Dave Jones
Jan 10, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[WATCHDOG] machzwd nowayout fixes from 2.4
parent
e7d9aa2a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
drivers/char/watchdog/machzwd.c
drivers/char/watchdog/machzwd.c
+9
-8
No files found.
drivers/char/watchdog/machzwd.c
View file @
44342733
...
@@ -117,7 +117,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
...
@@ -117,7 +117,7 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
#define PFX "machzwd"
#define PFX "machzwd"
static
struct
watchdog_info
zf_info
=
{
static
struct
watchdog_info
zf_info
=
{
.
options
=
WDIOF_KEEPALIVEPING
,
.
options
=
WDIOF_KEEPALIVEPING
|
WDIOF_MAGICCLOSE
,
.
firmware_version
=
1
,
.
firmware_version
=
1
,
.
identity
=
"ZF-Logic watchdog"
.
identity
=
"ZF-Logic watchdog"
};
};
...
@@ -314,7 +314,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
...
@@ -314,7 +314,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
/* See if we got the magic character */
/* See if we got the magic character */
if
(
count
){
if
(
count
){
/*
/*
* no need to check for close confirmation
* no need to check for close confirmation
* no way to disable watchdog ;)
* no way to disable watchdog ;)
*/
*/
...
@@ -328,7 +328,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
...
@@ -328,7 +328,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
zf_expect_close
=
0
;
zf_expect_close
=
0
;
/* now scan */
/* now scan */
for
(
ofs
=
0
;
ofs
!=
count
;
ofs
++
){
for
(
ofs
=
0
;
ofs
!=
count
;
ofs
++
){
char
c
;
char
c
;
if
(
get_user
(
c
,
buf
+
ofs
))
if
(
get_user
(
c
,
buf
+
ofs
))
return
-
EFAULT
;
return
-
EFAULT
;
...
@@ -338,6 +338,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
...
@@ -338,6 +338,7 @@ static ssize_t zf_write(struct file *file, const char *buf, size_t count,
}
}
}
}
}
}
/*
/*
* Well, anyhow someone wrote to us,
* Well, anyhow someone wrote to us,
* we should return that favour
* we should return that favour
...
@@ -395,9 +396,9 @@ static int zf_open(struct inode *inode, struct file *file)
...
@@ -395,9 +396,9 @@ static int zf_open(struct inode *inode, struct file *file)
return
-
EBUSY
;
return
-
EBUSY
;
}
}
if
(
nowayout
)
{
if
(
nowayout
)
MOD_INC_USE_COUNT
;
MOD_INC_USE_COUNT
;
}
zf_is_open
=
1
;
zf_is_open
=
1
;
spin_unlock
(
&
zf_lock
);
spin_unlock
(
&
zf_lock
);
...
...
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