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>
/*
- * 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
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) {