diff options
author | Lan Tianyu <tianyu.lan@intel.com> | 2013-08-13 06:11:22 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-08-13 06:11:22 -0400 |
commit | 22e7551eb6fd58352930306039a98313c011e615 (patch) | |
tree | 66328d3b046c0aacca1c9671713a1f3536665c77 /drivers/acpi | |
parent | d4e4ab86bcba5a72779c43dc1459f71fea3d89c8 (diff) |
ACPI / processor: Remove acpi_processor_get_limit_info()
acpi_processor_get_limit_info() is only called in the __acpi_processor_start()
and what it does actually is just to check pr->flags.throttling and set limit.
The pr pointer has been checked in the __acpi_processor_start() before
acpi_processor_get_limit_info() being called. It doesn't make sense still to
keep it as a function. So move code to __acpi_processor_start() and remove
acpi_processor_get_limit_info().
Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/processor_driver.c | 4 | ||||
-rw-r--r-- | drivers/acpi/processor_thermal.c | 12 |
2 files changed, 3 insertions, 13 deletions
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 870eaf5fa547..f0a4d0c0f967 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c | |||
@@ -179,7 +179,9 @@ static int __acpi_processor_start(struct acpi_device *device) | |||
179 | acpi_processor_load_module(pr); | 179 | acpi_processor_load_module(pr); |
180 | #endif | 180 | #endif |
181 | acpi_processor_get_throttling_info(pr); | 181 | acpi_processor_get_throttling_info(pr); |
182 | acpi_processor_get_limit_info(pr); | 182 | |
183 | if (pr->flags.throttling) | ||
184 | pr->flags.limit = 1; | ||
183 | 185 | ||
184 | if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver) | 186 | if (!cpuidle_get_driver() || cpuidle_get_driver() == &acpi_idle_driver) |
185 | acpi_processor_power_init(pr); | 187 | acpi_processor_power_init(pr); |
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c index e8e652710e65..d1d2e7fb5b30 100644 --- a/drivers/acpi/processor_thermal.c +++ b/drivers/acpi/processor_thermal.c | |||
@@ -186,18 +186,6 @@ static int cpufreq_set_cur_state(unsigned int cpu, int state) | |||
186 | 186 | ||
187 | #endif | 187 | #endif |
188 | 188 | ||
189 | int acpi_processor_get_limit_info(struct acpi_processor *pr) | ||
190 | { | ||
191 | |||
192 | if (!pr) | ||
193 | return -EINVAL; | ||
194 | |||
195 | if (pr->flags.throttling) | ||
196 | pr->flags.limit = 1; | ||
197 | |||
198 | return 0; | ||
199 | } | ||
200 | |||
201 | /* thermal coolign device callbacks */ | 189 | /* thermal coolign device callbacks */ |
202 | static int acpi_processor_max_state(struct acpi_processor *pr) | 190 | static int acpi_processor_max_state(struct acpi_processor *pr) |
203 | { | 191 | { |