Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Len Brown <len.brown@intel.com>
#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#ifdef CONFIG_X86_ACPI_CPUFREQ_PROC_INTF
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
+#include <linux/mutex.h>
#include <asm/uaccess.h>
#endif
#include <asm/uaccess.h>
#endif
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME("acpi_processor")
#define _COMPONENT ACPI_PROCESSOR_COMPONENT
ACPI_MODULE_NAME("acpi_processor")
-static DECLARE_MUTEX(performance_sem);
+static DEFINE_MUTEX(performance_mutex);
/*
* _PPC support is implemented as a CPUfreq policy notifier:
/*
* _PPC support is implemented as a CPUfreq policy notifier:
struct acpi_processor *pr;
unsigned int ppc = 0;
struct acpi_processor *pr;
unsigned int ppc = 0;
- down(&performance_sem);
+ mutex_lock(&performance_mutex);
if (event != CPUFREQ_INCOMPATIBLE)
goto out;
if (event != CPUFREQ_INCOMPATIBLE)
goto out;
core_frequency * 1000);
out:
core_frequency * 1000);
out:
+ mutex_unlock(&performance_mutex);
if (!(acpi_processor_ppc_status & PPC_REGISTERED))
return_VALUE(-EINVAL);
if (!(acpi_processor_ppc_status & PPC_REGISTERED))
return_VALUE(-EINVAL);
- down(&performance_sem);
+ mutex_lock(&performance_mutex);
pr = processors[cpu];
if (!pr) {
pr = processors[cpu];
if (!pr) {
+ mutex_unlock(&performance_mutex);
return_VALUE(-ENODEV);
}
if (pr->performance) {
return_VALUE(-ENODEV);
}
if (pr->performance) {
+ mutex_unlock(&performance_mutex);
if (acpi_processor_get_performance_info(pr)) {
pr->performance = NULL;
if (acpi_processor_get_performance_info(pr)) {
pr->performance = NULL;
+ mutex_unlock(&performance_mutex);
return_VALUE(-EIO);
}
acpi_cpufreq_add_file(pr);
return_VALUE(-EIO);
}
acpi_cpufreq_add_file(pr);
+ mutex_unlock(&performance_mutex);
ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance");
ACPI_FUNCTION_TRACE("acpi_processor_unregister_performance");
- down(&performance_sem);
+ mutex_lock(&performance_mutex);
pr = processors[cpu];
if (!pr) {
pr = processors[cpu];
if (!pr) {
+ mutex_unlock(&performance_mutex);
acpi_cpufreq_remove_file(pr);
acpi_cpufreq_remove_file(pr);
+ mutex_unlock(&performance_mutex);