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
if (endp == val)
return -EINVAL;
- down_read(®ister_sem);
*((int *)kp->arg) = l;
if (watchdog_user)
rv = ipmi_set_timeout(IPMI_SET_TIMEOUT_HB_IF_NECESSARY);
- up_read(®ister_sem);
return rv;
}
s = strstrip(valcp);
- down_read(®ister_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(®ister_sem);
+ out:
return rv;
}
{
int rv = -EBUSY;
- down_write(®ister_sem);
if (watchdog_user)
goto out;
}
out:
- up_write(®ister_sem);
-
if ((start_now) && (rv == 0)) {
/* Run from startup, so start the timer now. */
start_now = 0; /* Disable this function after first startup. */
{
int rv;
- down_write(®ister_sem);
-
if (!watchdog_user)
goto out;
watchdog_user = NULL;
out:
- up_write(®ister_sem);
+ return;
}
#ifdef HAVE_NMI_HANDLER