Commit f7079628 authored by Alan Cox's avatar Alan Cox Committed by Linus Torvalds

[PATCH] small ipmi updates

parent e9bc58c4
......@@ -81,10 +81,10 @@ static unsigned int ipmi_poll(struct file *file, poll_table *wait)
unsigned int mask = 0;
unsigned long flags;
spin_lock_irqsave(&priv->recv_msg_lock, flags);
poll_wait(file, &priv->wait, wait);
spin_lock_irqsave(&priv->recv_msg_lock, flags);
if (! list_empty(&(priv->recv_msgs)))
mask |= (POLLIN | POLLRDNORM);
......
......@@ -629,6 +629,18 @@ static void request_events(void *send_info)
atomic_set(&kcs_info->req_events, 1);
}
static int new_user(void *send_info)
{
if (!try_module_get(THIS_MODULE))
return -EBUSY;
return 0;
}
static void user_left(void *send_info)
{
module_put(THIS_MODULE);
}
static int initialized = 0;
/* Must be called with interrupts off and with the kcs_lock held. */
......
......@@ -345,7 +345,7 @@ static int intf_next_seq(ipmi_smi_t intf,
unsigned int i;
for (i=intf->curr_seq;
i!=(intf->curr_seq-1);
(i+1)%IPMI_IPMB_NUM_SEQ != intf->curr_seq;
i=(i+1)%IPMI_IPMB_NUM_SEQ)
{
if (! intf->seq_table[i].inuse)
......@@ -907,8 +907,6 @@ static inline int i_ipmi_request(ipmi_user_t user,
probably, so abort. */
spin_unlock_irqrestore(&(intf->seq_lock),
flags);
ipmi_free_recv_msg(recv_msg);
ipmi_free_smi_msg(smi_msg);
goto out_err;
}
......
......@@ -751,7 +751,7 @@ static void ipmi_register_watchdog(int ipmi_intf)
{
int rv = -EBUSY;
down_read(&register_sem);
down_write(&register_sem);
if (watchdog_user)
goto out;
......@@ -917,7 +917,7 @@ static int __init ipmi_wdog_init(void)
} else if (strcmp(preaction, "pre_int") == 0) {
preaction_val = WDOG_PRETIMEOUT_MSG_INT;
} else {
action_val = WDOG_PRETIMEOUT_NONE;
preaction_val = WDOG_PRETIMEOUT_NONE;
printk("ipmi_watchdog: Unknown preaction '%s', defaulting to"
" none\n", preaction);
}
......@@ -929,7 +929,7 @@ static int __init ipmi_wdog_init(void)
} else if (strcmp(preop, "preop_give_data") == 0) {
preop_val = WDOG_PREOP_GIVE_DATA;
} else {
action_val = WDOG_PREOP_NONE;
preop_val = WDOG_PREOP_NONE;
printk("ipmi_watchdog: Unknown preop '%s', defaulting to"
" none\n", preop);
}
......
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