X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Flinux%2Far7%2Ffiles%2Fdrivers%2Fchar%2Fwatchdog%2Far7_wdt.c;fp=target%2Flinux%2Far7%2Ffiles%2Fdrivers%2Fchar%2Fwatchdog%2Far7_wdt.c;h=a1bbad0365376de4b560a632038ac694193d46ad;hb=969318c24f2101c94c43067e376474e13d159dcf;hp=04c2e2e94b8d9a2ec6fbeb6745156c30eeaab620;hpb=1fe90486fddafe3e6120795403002a9a78fed247;p=openwrt-10.03%2F.git diff --git a/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c b/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c index 04c2e2e94..a1bbad036 100644 --- a/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c +++ b/target/linux/ar7/files/drivers/char/watchdog/ar7_wdt.c @@ -59,7 +59,7 @@ struct ar7_wdt { u32 kick_lock; u32 kick; u32 change_lock; - u32 change ; + u32 change; u32 disable_lock; u32 disable; u32 prescale_lock; @@ -186,13 +186,13 @@ static int ar7_wdt_open(struct inode *inode, struct file *file) static int ar7_wdt_release(struct inode *inode, struct file *file) { - if (!expect_close) { + if (!expect_close) printk(KERN_WARNING DRVNAME ": watchdog device closed unexpectedly," "will not disable the watchdog timer\n"); - } else if (!nowayout) { + else if (!nowayout) ar7_wdt_disable_wdt(); - } + up(&open_semaphore); return 0; @@ -280,24 +280,24 @@ static int ar7_wdt_ioctl(struct inode *inode, struct file *file, } static struct file_operations ar7_wdt_fops = { - .owner = THIS_MODULE, - .write = ar7_wdt_write, - .ioctl = ar7_wdt_ioctl, - .open = ar7_wdt_open, - .release = ar7_wdt_release, + .owner = THIS_MODULE, + .write = ar7_wdt_write, + .ioctl = ar7_wdt_ioctl, + .open = ar7_wdt_open, + .release = ar7_wdt_release, }; static struct miscdevice ar7_wdt_miscdev = { - .minor = WATCHDOG_MINOR, - .name = "watchdog", - .fops = &ar7_wdt_fops, + .minor = WATCHDOG_MINOR, + .name = "watchdog", + .fops = &ar7_wdt_fops, }; static int __init ar7_wdt_init(void) { int rc; - ar7_wdt_get_regs(); + ar7_wdt_get_regs(); if (!request_mem_region(ar7_regs_wdt, sizeof(struct ar7_wdt), LONGNAME)) {