示例#1
0
static int ipmi_release(struct inode *inode, struct file *file)
{
    struct ipmi_file_private *priv = file->private_data;
    int                      rv;

    rv = ipmi_destroy_user(priv->user);
    if (rv)
        return rv;

    ipmi_fasync (-1, file, 0);

    /* FIXME - free the messages in the list. */
    kfree(priv);

    return 0;
}
示例#2
0
static int ipmi_close(struct inode *ino, struct file *filep)
{
	if (iminor(ino)==WATCHDOG_MINOR)
	{
		if (expect_close == 42) {
			ipmi_watchdog_state = WDOG_TIMEOUT_NONE;
			ipmi_set_timeout(IPMI_SET_TIMEOUT_NO_HB);
		} else {
			printk(KERN_CRIT PFX "Unexpected close, not stopping watchdog!\n");
			ipmi_heartbeat();
		}
		clear_bit(0, &ipmi_wdog_open);
	}

	ipmi_fasync (-1, filep, 0);
	expect_close = 0;

	return 0;
}