Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 71234
b: refs/heads/master
c: f8fbcd3
h: refs/heads/master
v: v3
  • Loading branch information
Corey Minyard authored and Linus Torvalds committed Oct 18, 2007
1 parent 57a2770 commit 78fccfd
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c45adc39156dfb0a296df218d62ba8b68cadf12e
refs/heads/master: f8fbcd3b9da5830fded133dbeb7066b1b92ee736
17 changes: 3 additions & 14 deletions trunk/drivers/char/ipmi/ipmi_watchdog.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ static char expect_close;

static int ifnum_to_use = -1;

static DECLARE_RWSEM(register_sem);

/* Parameters to ipmi_set_timeout */
#define IPMI_SET_TIMEOUT_NO_HB 0
#define IPMI_SET_TIMEOUT_HB_IF_NECESSARY 1
Expand All @@ -193,11 +191,9 @@ static int set_param_int(const char *val, struct kernel_param *kp)
if (endp == val)
return -EINVAL;

down_read(&register_sem);
*((int *)kp->arg) = l;
if (watchdog_user)
rv = ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
up_read(&register_sem);

return rv;
}
Expand Down Expand Up @@ -226,17 +222,15 @@ static int set_param_str(const char *val, struct kernel_param *kp)

s = strstrip(valcp);

down_read(&register_sem);
rv = fn(s, NULL);
if (rv)
goto out_unlock;
goto out;

check_parms();
if (watchdog_user)
rv = ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);

out_unlock:
up_read(&register_sem);
out:
return rv;
}

Expand Down Expand Up @@ -895,7 +889,6 @@ static void ipmi_register_watchdog(int ipmi_intf)
{
int rv = -EBUSY;

down_write(&register_sem);
if (watchdog_user)
goto out;

Expand All @@ -922,8 +915,6 @@ static void ipmi_register_watchdog(int ipmi_intf)
}

out:
up_write(&register_sem);

if ((start_now) && (rv == 0)) {
/* Run from startup, so start the timer now. */
start_now = 0; /* Disable this function after first startup. */
Expand All @@ -937,8 +928,6 @@ static void ipmi_unregister_watchdog(int ipmi_intf)
{
int rv;

down_write(&register_sem);

if (!watchdog_user)
goto out;

Expand All @@ -963,7 +952,7 @@ static void ipmi_unregister_watchdog(int ipmi_intf)
watchdog_user = NULL;

out:
up_write(&register_sem);
return;
}

#ifdef HAVE_NMI_HANDLER
Expand Down

0 comments on commit 78fccfd

Please sign in to comment.