diff options
author | Corey Minyard <cminyard@mvista.com> | 2007-10-18 03:07:08 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-18 14:37:32 -0700 |
commit | f8fbcd3b9da5830fded133dbeb7066b1b92ee736 (patch) | |
tree | 7967280913d05d2d506a7929d6467dc7c0ceb4b2 /drivers | |
parent | c45adc39156dfb0a296df218d62ba8b68cadf12e (diff) | |
download | op-kernel-dev-f8fbcd3b9da5830fded133dbeb7066b1b92ee736.zip op-kernel-dev-f8fbcd3b9da5830fded133dbeb7066b1b92ee736.tar.gz |
IPMI: remove bogus semaphore from watchdog
Lockdep was giving an error when loading the IPMI watchdog module. It turns
out that if you try to claim a lock in a parameter handling routine, lockdep
won't see that lock as "static" yet because the module is not yet on the
module list, so it will complain.
However, the semaphore in question is completely unnecessary. So just remove
it.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/ipmi/ipmi_watchdog.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/drivers/char/ipmi/ipmi_watchdog.c b/drivers/char/ipmi/ipmi_watchdog.c index 41f78e2..806106b 100644 --- a/drivers/char/ipmi/ipmi_watchdog.c +++ b/drivers/char/ipmi/ipmi_watchdog.c @@ -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 @@ -193,11 +191,9 @@ static int set_param_int(const char *val, struct kernel_param *kp) 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; } @@ -226,17 +222,15 @@ static int set_param_str(const char *val, struct kernel_param *kp) 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; } @@ -895,7 +889,6 @@ static void ipmi_register_watchdog(int ipmi_intf) { int rv = -EBUSY; - down_write(®ister_sem); if (watchdog_user) goto out; @@ -922,8 +915,6 @@ static void ipmi_register_watchdog(int ipmi_intf) } 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. */ @@ -937,8 +928,6 @@ static void ipmi_unregister_watchdog(int ipmi_intf) { int rv; - down_write(®ister_sem); - if (!watchdog_user) goto out; @@ -963,7 +952,7 @@ static void ipmi_unregister_watchdog(int ipmi_intf) watchdog_user = NULL; out: - up_write(®ister_sem); + return; } #ifdef HAVE_NMI_HANDLER |