Commit 8ec11413 authored by Dave Jones's avatar Dave Jones Committed by Dave Jones

[WATCHDOG] eurotech indentation fixes

parent 6b82f019
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment