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
8ec11413
Commit
8ec11413
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] eurotech indentation fixes
parent
6b82f019
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
249 additions
and
251 deletions
+249
-251
drivers/char/watchdog/eurotechwdt.c
drivers/char/watchdog/eurotechwdt.c
+249
-251
No files found.
drivers/char/watchdog/eurotechwdt.c
View file @
8ec11413
...
...
@@ -19,7 +19,7 @@
* warranty for any of this software. This material is provided
* "AS-IS" and at no charge.
*
*
(c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>*
*
(c) Copyright 1995 Alan Cox <alan@lxorguk.ukuu.org.uk>
*
* 14-Dec-2001 Matt Domsch <Matt_Domsch@dell.com>
* Added nowayout module option to override CONFIG_WATCHDOG_NOWAYOUT
...
...
@@ -80,10 +80,10 @@ MODULE_PARM_DESC(nowayout, "Watchdog cannot be stopped once started (default=CON
#define WDT_CTRL_REG 0x30
#define WDT_OUTPIN_CFG 0xe2
#define WDT_EVENT_INT
0x00
#define WDT_EVENT_REBOOT
0x08
#define WDT_EVENT_INT
0x00
#define WDT_EVENT_REBOOT
0x08
#define WDT_UNIT_SEL 0xf1
#define WDT_UNIT_SECS
0x80
#define WDT_UNIT_SECS
0x80
#define WDT_TIMEOUT_VAL 0xf2
#define WDT_TIMER_CFG 0xf3
...
...
@@ -103,7 +103,7 @@ static int __init eurwdt_setup(char *str)
{
int
ints
[
4
];
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
str
=
get_options
(
str
,
ARRAY_SIZE
(
ints
),
ints
);
if
(
ints
[
0
]
>
0
)
{
io
=
ints
[
1
];
...
...
@@ -170,8 +170,8 @@ static void eurwdt_activate_timer(void)
{
eurwdt_disable_timer
();
eurwdt_write_reg
(
WDT_CTRL_REG
,
0x01
);
/* activate the WDT */
eurwdt_write_reg
(
WDT_OUTPIN_CFG
,
!
strcmp
(
"int"
,
ev
)
?
WDT_EVENT_INT
:
WDT_EVENT_REBOOT
);
eurwdt_write_reg
(
WDT_OUTPIN_CFG
,
!
strcmp
(
"int"
,
ev
)
?
WDT_EVENT_INT
:
WDT_EVENT_REBOOT
);
/* Setting interrupt line */
if
(
irq
==
2
||
irq
>
15
||
irq
<
0
)
{
printk
(
KERN_ERR
": invalid irq number
\n
"
);
...
...
@@ -179,6 +179,7 @@ static void eurwdt_activate_timer(void)
}
if
(
irq
==
0
)
printk
(
KERN_INFO
": interrupt disabled
\n
"
);
eurwdt_write_reg
(
WDT_TIMER_CFG
,
irq
<<
4
);
eurwdt_write_reg
(
WDT_UNIT_SEL
,
WDT_UNIT_SECS
);
/* we use seconds */
...
...
@@ -310,9 +311,8 @@ static int eurwdt_open(struct inode *inode, struct file *file)
spin_unlock
(
&
eurwdt_lock
);
return
-
EBUSY
;
}
if
(
nowayout
)
{
if
(
nowayout
)
MOD_INC_USE_COUNT
;
}
eurwdt_is_open
=
1
;
...
...
@@ -322,7 +322,6 @@ static int eurwdt_open(struct inode *inode, struct file *file)
spin_unlock
(
&
eurwdt_lock
);
MOD_INC_USE_COUNT
;
return
0
;
case
TEMP_MINOR
:
...
...
@@ -348,11 +347,10 @@ static int eurwdt_open(struct inode *inode, struct file *file)
static
int
eurwdt_release
(
struct
inode
*
inode
,
struct
file
*
file
)
{
if
(
minor
(
inode
->
i_rdev
)
==
WATCHDOG_MINOR
)
{
if
(
!
nowayout
)
{
if
(
!
nowayout
)
eurwdt_disable_timer
();
}
eurwdt_is_open
=
0
;
eurwdt_is_open
=
0
;
MOD_DEC_USE_COUNT
;
}
...
...
@@ -479,16 +477,16 @@ static int __init eurwdt_init(void)
spin_lock_init
(
&
eurwdt_lock
);
out:
out:
return
ret
;
outreg:
outreg:
release_region
(
io
,
2
);
outirq:
outirq:
free_irq
(
irq
,
NULL
);
outmisc:
outmisc:
misc_deregister
(
&
eurwdt_miscdev
);
goto
out
;
}
...
...
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