static int orion_wdt_release(struct inode *inode, struct file *file)
{
	if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
		orion_wdt_disable();
	else
		pr_crit("Device closed unexpectedly - timer will not stop\n");
	clear_bit(WDT_IN_USE, &wdt_status);
	clear_bit(WDT_OK_TO_CLOSE, &wdt_status);

	return 0;
}
Example #2
0
static int orion_wdt_release(struct inode *inode, struct file *file)
{
	if (test_bit(WDT_OK_TO_CLOSE, &wdt_status))
		orion_wdt_disable();
	else
//		printk(KERN_CRIT "WATCHDOG: Device closed unexpectedly - "
;
	clear_bit(WDT_IN_USE, &wdt_status);
	clear_bit(WDT_OK_TO_CLOSE, &wdt_status);

	return 0;
}
Example #3
0
static int __devexit orion_wdt_remove(struct platform_device *pdev)
{
    int ret;

    if (test_bit(WDT_IN_USE, &wdt_status)) {
        orion_wdt_disable();
        clear_bit(WDT_IN_USE, &wdt_status);
    }

    ret = misc_deregister(&orion_wdt_miscdev);
    if (!ret)
        orion_wdt_miscdev.parent = NULL;

    return ret;
}
Example #4
0
static void orion_wdt_shutdown(struct platform_device *pdev)
{
    if (test_bit(WDT_IN_USE, &wdt_status))
        orion_wdt_disable();
}