aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@vyatta.com>2010-10-18 11:42:48 -0400
committerLen Brown <len.brown@intel.com>2010-10-19 13:44:21 -0400
commit5ba8b1c6fe40c314a02e28553c25552d8f1442e7 (patch)
treeb5c2dd8138125eebd66d1dc0526226d948e37e12
parent3a2468d0274d10916baf5318f9004a8061533370 (diff)
ACPI: remove dead code
Found by running make namespacecheck on linux-next Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r--drivers/acpi/osl.c25
-rw-r--r--drivers/acpi/processor_driver.c2
-rw-r--r--drivers/acpi/processor_thermal.c107
-rw-r--r--include/acpi/acpi_drivers.h2
-rw-r--r--include/acpi/acpiosxf.h2
-rw-r--r--include/linux/acpi.h8
6 files changed, 0 insertions, 146 deletions
diff --git a/drivers/acpi/osl.c b/drivers/acpi/osl.c
index 65b25a303b86..82097fd5a75b 100644
--- a/drivers/acpi/osl.c
+++ b/drivers/acpi/osl.c
@@ -780,16 +780,6 @@ void acpi_os_wait_events_complete(void *context)
780EXPORT_SYMBOL(acpi_os_wait_events_complete); 780EXPORT_SYMBOL(acpi_os_wait_events_complete);
781 781
782/* 782/*
783 * Allocate the memory for a spinlock and initialize it.
784 */
785acpi_status acpi_os_create_lock(acpi_spinlock * handle)
786{
787 spin_lock_init(*handle);
788
789 return AE_OK;
790}
791
792/*
793 * Deallocate the memory for a spinlock. 783 * Deallocate the memory for a spinlock.
794 */ 784 */
795void acpi_os_delete_lock(acpi_spinlock handle) 785void acpi_os_delete_lock(acpi_spinlock handle)
@@ -1152,21 +1142,6 @@ int acpi_check_region(resource_size_t start, resource_size_t n,
1152} 1142}
1153EXPORT_SYMBOL(acpi_check_region); 1143EXPORT_SYMBOL(acpi_check_region);
1154 1144
1155int acpi_check_mem_region(resource_size_t start, resource_size_t n,
1156 const char *name)
1157{
1158 struct resource res = {
1159 .start = start,
1160 .end = start + n - 1,
1161 .name = name,
1162 .flags = IORESOURCE_MEM,
1163 };
1164
1165 return acpi_check_resource_conflict(&res);
1166
1167}
1168EXPORT_SYMBOL(acpi_check_mem_region);
1169
1170/* 1145/*
1171 * Let drivers know whether the resource checks are effective 1146 * Let drivers know whether the resource checks are effective
1172 */ 1147 */
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c
index 347eb21b2353..8d924a8e4e0b 100644
--- a/drivers/acpi/processor_driver.c
+++ b/drivers/acpi/processor_driver.c
@@ -899,6 +899,4 @@ static void __exit acpi_processor_exit(void)
899module_init(acpi_processor_init); 899module_init(acpi_processor_init);
900module_exit(acpi_processor_exit); 900module_exit(acpi_processor_exit);
901 901
902EXPORT_SYMBOL(acpi_processor_set_thermal_limit);
903
904MODULE_ALIAS("processor"); 902MODULE_ALIAS("processor");
diff --git a/drivers/acpi/processor_thermal.c b/drivers/acpi/processor_thermal.c
index 953b25fb9869..419f651b63f3 100644
--- a/drivers/acpi/processor_thermal.c
+++ b/drivers/acpi/processor_thermal.c
@@ -238,113 +238,6 @@ static int acpi_thermal_cpufreq_decrease(unsigned int cpu)
238 238
239#endif 239#endif
240 240
241int acpi_processor_set_thermal_limit(acpi_handle handle, int type)
242{
243 int result = 0;
244 struct acpi_processor *pr = NULL;
245 struct acpi_device *device = NULL;
246 int tx = 0, max_tx_px = 0;
247
248
249 if ((type < ACPI_PROCESSOR_LIMIT_NONE)
250 || (type > ACPI_PROCESSOR_LIMIT_DECREMENT))
251 return -EINVAL;
252
253 result = acpi_bus_get_device(handle, &device);
254 if (result)
255 return result;
256
257 pr = acpi_driver_data(device);
258 if (!pr)
259 return -ENODEV;
260
261 /* Thermal limits are always relative to the current Px/Tx state. */
262 if (pr->flags.throttling)
263 pr->limit.thermal.tx = pr->throttling.state;
264
265 /*
266 * Our default policy is to only use throttling at the lowest
267 * performance state.
268 */
269
270 tx = pr->limit.thermal.tx;
271
272 switch (type) {
273
274 case ACPI_PROCESSOR_LIMIT_NONE:
275 do {
276 result = acpi_thermal_cpufreq_decrease(pr->id);
277 } while (!result);
278 tx = 0;
279 break;
280
281 case ACPI_PROCESSOR_LIMIT_INCREMENT:
282 /* if going up: P-states first, T-states later */
283
284 result = acpi_thermal_cpufreq_increase(pr->id);
285 if (!result)
286 goto end;
287 else if (result == -ERANGE)
288 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
289 "At maximum performance state\n"));
290
291 if (pr->flags.throttling) {
292 if (tx == (pr->throttling.state_count - 1))
293 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
294 "At maximum throttling state\n"));
295 else
296 tx++;
297 }
298 break;
299
300 case ACPI_PROCESSOR_LIMIT_DECREMENT:
301 /* if going down: T-states first, P-states later */
302
303 if (pr->flags.throttling) {
304 if (tx == 0) {
305 max_tx_px = 1;
306 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
307 "At minimum throttling state\n"));
308 } else {
309 tx--;
310 goto end;
311 }
312 }
313
314 result = acpi_thermal_cpufreq_decrease(pr->id);
315 if (result) {
316 /*
317 * We only could get -ERANGE, 1 or 0.
318 * In the first two cases we reached max freq again.
319 */
320 ACPI_DEBUG_PRINT((ACPI_DB_INFO,
321 "At minimum performance state\n"));
322 max_tx_px = 1;
323 } else
324 max_tx_px = 0;
325
326 break;
327 }
328
329 end:
330 if (pr->flags.throttling) {
331 pr->limit.thermal.px = 0;
332 pr->limit.thermal.tx = tx;
333
334 result = acpi_processor_apply_limit(pr);
335 if (result)
336 printk(KERN_ERR PREFIX "Unable to set thermal limit\n");
337
338 ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Thermal limit now (P%d:T%d)\n",
339 pr->limit.thermal.px, pr->limit.thermal.tx));
340 } else
341 result = 0;
342 if (max_tx_px)
343 return 1;
344 else
345 return result;
346}
347
348int acpi_processor_get_limit_info(struct acpi_processor *pr) 241int acpi_processor_get_limit_info(struct acpi_processor *pr)
349{ 242{
350 243
diff --git a/include/acpi/acpi_drivers.h b/include/acpi/acpi_drivers.h
index 23d78b4d088b..3090471b2a5e 100644
--- a/include/acpi/acpi_drivers.h
+++ b/include/acpi/acpi_drivers.h
@@ -115,8 +115,6 @@ void pci_acpi_crs_quirks(void);
115#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01 115#define ACPI_PROCESSOR_LIMIT_INCREMENT 0x01
116#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02 116#define ACPI_PROCESSOR_LIMIT_DECREMENT 0x02
117 117
118int acpi_processor_set_thermal_limit(acpi_handle handle, int type);
119
120/*-------------------------------------------------------------------------- 118/*--------------------------------------------------------------------------
121 Dock Station 119 Dock Station
122 -------------------------------------------------------------------------- */ 120 -------------------------------------------------------------------------- */
diff --git a/include/acpi/acpiosxf.h b/include/acpi/acpiosxf.h
index 29bf945143e8..782acdf0286d 100644
--- a/include/acpi/acpiosxf.h
+++ b/include/acpi/acpiosxf.h
@@ -98,8 +98,6 @@ acpi_os_table_override(struct acpi_table_header *existing_table,
98/* 98/*
99 * Spinlock primitives 99 * Spinlock primitives
100 */ 100 */
101acpi_status acpi_os_create_lock(acpi_spinlock * out_handle);
102
103void acpi_os_delete_lock(acpi_spinlock handle); 101void acpi_os_delete_lock(acpi_spinlock handle);
104 102
105acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle); 103acpi_cpu_flags acpi_os_acquire_lock(acpi_spinlock handle);
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index c227757feb06..659c743b63e3 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -245,8 +245,6 @@ int acpi_check_resource_conflict(const struct resource *res);
245 245
246int acpi_check_region(resource_size_t start, resource_size_t n, 246int acpi_check_region(resource_size_t start, resource_size_t n,
247 const char *name); 247 const char *name);
248int acpi_check_mem_region(resource_size_t start, resource_size_t n,
249 const char *name);
250 248
251int acpi_resources_are_enforced(void); 249int acpi_resources_are_enforced(void);
252 250
@@ -344,12 +342,6 @@ static inline int acpi_check_region(resource_size_t start, resource_size_t n,
344 return 0; 342 return 0;
345} 343}
346 344
347static inline int acpi_check_mem_region(resource_size_t start,
348 resource_size_t n, const char *name)
349{
350 return 0;
351}
352
353struct acpi_table_header; 345struct acpi_table_header;
354static inline int acpi_table_parse(char *id, 346static inline int acpi_table_parse(char *id,
355 int (*handler)(struct acpi_table_header *)) 347 int (*handler)(struct acpi_table_header *))