summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorArtem Savkov <artem.savkov@gmail.com>2013-03-02 15:25:15 +1100
committerStephen Rothwell <sfr@canb.auug.org.au>2013-03-07 14:24:47 +1100
commit40ede57ae4546bc713a60fe54a19ce85353069ab (patch)
treef4e32b4ca12939b09c2db370328c37abae45fd3b /drivers
parentc09bc0e9175ea2b789dbf02ada9e978e0dc74b8f (diff)
drivers/platform/x86/thinkpad_acpi.c: move hotkey_thread_mutex lock after set_freezable()
set_freezable() runs try_to_freeze() during which no locks should be held. hotkey_thread_mutex lock should be moved closer to where it is actually needed. This fixes a boot-time lockdep warning which results from "lockdep: check that no locks held at freeze time". Signed-off-by: Artem Savkov <artem.savkov@gmail.com> Cc: Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br> Cc: Matthew Garrett <matthew.garrett@nebula.com> Cc: "Rafael J. Wysocki" <rjw@sisk.pl> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/platform/x86/thinkpad_acpi.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
index 9a907567f41e..5241ee0ba9d9 100644
--- a/drivers/platform/x86/thinkpad_acpi.c
+++ b/drivers/platform/x86/thinkpad_acpi.c
@@ -2462,13 +2462,13 @@ static int hotkey_kthread(void *data)
unsigned int poll_freq;
bool was_frozen;
- mutex_lock(&hotkey_thread_mutex);
-
if (tpacpi_lifecycle == TPACPI_LIFE_EXITING)
goto exit;
set_freezable();
+ mutex_lock(&hotkey_thread_mutex);
+
so = 0;
si = 1;
t = 0;
@@ -2522,8 +2522,8 @@ static int hotkey_kthread(void *data)
si ^= 1;
}
-exit:
mutex_unlock(&hotkey_thread_mutex);
+exit:
return 0;
}