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
97cb93ec
Commit
97cb93ec
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] Advantech fixes from 2.4
parent
0e02e111
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
4 deletions
+18
-4
drivers/char/watchdog/advantechwdt.c
drivers/char/watchdog/advantechwdt.c
+18
-4
No files found.
drivers/char/watchdog/advantechwdt.c
View file @
97cb93ec
...
@@ -99,10 +99,22 @@ advwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
...
@@ -99,10 +99,22 @@ advwdt_write(struct file *file, const char *buf, size_t count, loff_t *ppos)
return
-
ESPIPE
;
return
-
ESPIPE
;
if
(
count
)
{
if
(
count
)
{
if
(
!
nowayout
)
{
size_t
i
;
adv_expect_close
=
0
;
for
(
i
=
0
;
i
!=
count
;
i
++
)
{
char
c
;
if
(
get_user
(
c
,
buf
+
i
))
return
-
EFAULT
;
if
(
c
==
'V'
)
adv_expect_close
=
42
;
}
}
advwdt_ping
();
advwdt_ping
();
return
1
;
}
}
return
0
;
return
count
;
}
}
static
ssize_t
static
ssize_t
...
@@ -116,9 +128,11 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
...
@@ -116,9 +128,11 @@ advwdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
unsigned
long
arg
)
unsigned
long
arg
)
{
{
static
struct
watchdog_info
ident
=
{
static
struct
watchdog_info
ident
=
{
WDIOF_KEEPALIVEPING
,
1
,
"Advantech WDT"
.
options
=
WDIOF_KEEPALIVEPING
|
WDIOF_SETTIMEOUT
|
WDIOF_MAGICCLOSE
,
.
firmware_version
=
1
,
.
identity
=
"Advantech WDT"
};
};
switch
(
cmd
)
{
switch
(
cmd
)
{
case
WDIOC_GETSUPPORT
:
case
WDIOC_GETSUPPORT
:
if
(
copy_to_user
((
struct
watchdog_info
*
)
arg
,
&
ident
,
sizeof
(
ident
)))
if
(
copy_to_user
((
struct
watchdog_info
*
)
arg
,
&
ident
,
sizeof
(
ident
)))
...
...
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