diff options
author | Sai Gurrappadi <sgurrappadi@nvidia.com> | 2013-12-12 15:25:53 -0800 |
---|---|---|
committer | Sai Gurrappadi <sgurrappadi@nvidia.com> | 2013-12-13 08:01:02 -0800 |
commit | 0c19227ea07f7aa54cc6b1db234cdd4539138d43 (patch) | |
tree | 27f787f67a25c2ecbf43d09142921ba3e0e6d2fc /drivers/cpuquiet | |
parent | c22defbb9c8f3d2a22ccf75331c3b550814a915a (diff) |
cpuquiet: Fix locking in driver_unregister
cpuquiet_switch_governors needs to be protected with the cpuquiet_lock.
Change-Id: I948d1190a270b9e8b732eaad80a303560fe9f282
Signed-off-by: Sai Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/345013
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
Diffstat (limited to 'drivers/cpuquiet')
-rw-r--r-- | drivers/cpuquiet/driver.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/cpuquiet/driver.c b/drivers/cpuquiet/driver.c index fb9912b86e5e..097d2e36b79d 100644 --- a/drivers/cpuquiet/driver.c +++ b/drivers/cpuquiet/driver.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2012 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2012-2013 NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -197,10 +197,10 @@ void cpuquiet_unregister_driver(struct cpuquiet_driver *drv) return; } - /* stop current governor first */ - cpuquiet_switch_governor(NULL); - mutex_lock(&cpuquiet_lock); + + /* Stop current governor first */ + cpuquiet_switch_governor(NULL); cpuquiet_curr_driver = NULL; for_each_possible_cpu(cpu) { |