aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2007-04-25 14:17:39 -0400
committerLen Brown <len.brown@intel.com>2007-04-25 14:17:39 -0400
commita0bd4ac498acfe60f7533d15ba60d5efdd4e9ca5 (patch)
tree7b44633901a16fa0a1da34af0a1fa56e62c830d7 /drivers/acpi
parentd8938801d10945ac2fbe0f41ded43f6276660a17 (diff)
ACPI: Remove duplicate definitions for _STA bits
No need to duplicate the existing definitions in include/acpi/actypes.h. syntax only -- no functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/acpi_memhotplug.c13
-rw-r--r--drivers/acpi/container.c6
-rw-r--r--drivers/acpi/processor_core.c4
3 files changed, 7 insertions, 16 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index c26172671fd8..e65628a03085 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -44,11 +44,6 @@ MODULE_AUTHOR("Naveen B S <naveen.b.s@intel.com>");
44MODULE_DESCRIPTION("Hotplug Mem Driver"); 44MODULE_DESCRIPTION("Hotplug Mem Driver");
45MODULE_LICENSE("GPL"); 45MODULE_LICENSE("GPL");
46 46
47/* ACPI _STA method values */
48#define ACPI_MEMORY_STA_PRESENT (0x00000001UL)
49#define ACPI_MEMORY_STA_ENABLED (0x00000002UL)
50#define ACPI_MEMORY_STA_FUNCTIONAL (0x00000008UL)
51
52/* Memory Device States */ 47/* Memory Device States */
53#define MEMORY_INVALID_STATE 0 48#define MEMORY_INVALID_STATE 0
54#define MEMORY_POWER_ON_STATE 1 49#define MEMORY_POWER_ON_STATE 1
@@ -204,9 +199,9 @@ static int acpi_memory_check_device(struct acpi_memory_device *mem_device)
204 * Check for device status. Device should be 199 * Check for device status. Device should be
205 * present/enabled/functioning. 200 * present/enabled/functioning.
206 */ 201 */
207 if (!((current_status & ACPI_MEMORY_STA_PRESENT) 202 if (!((current_status & ACPI_STA_DEVICE_PRESENT)
208 && (current_status & ACPI_MEMORY_STA_ENABLED) 203 && (current_status & ACPI_STA_DEVICE_ENABLED)
209 && (current_status & ACPI_MEMORY_STA_FUNCTIONAL))) 204 && (current_status & ACPI_STA_DEVICE_FUNCTIONING)))
210 return -ENODEV; 205 return -ENODEV;
211 206
212 return 0; 207 return 0;
@@ -286,7 +281,7 @@ static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
286 return -ENODEV; 281 return -ENODEV;
287 282
288 /* Check for device status. Device should be disabled */ 283 /* Check for device status. Device should be disabled */
289 if (current_status & ACPI_MEMORY_STA_ENABLED) 284 if (current_status & ACPI_STA_DEVICE_ENABLED)
290 return -EINVAL; 285 return -EINVAL;
291 286
292 return 0; 287 return 0;
diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c
index 0930d9413dfa..0dd3bf7c0ed1 100644
--- a/drivers/acpi/container.c
+++ b/drivers/acpi/container.c
@@ -49,8 +49,6 @@ MODULE_AUTHOR("Anil S Keshavamurthy");
49MODULE_DESCRIPTION("ACPI container driver"); 49MODULE_DESCRIPTION("ACPI container driver");
50MODULE_LICENSE("GPL"); 50MODULE_LICENSE("GPL");
51 51
52#define ACPI_STA_PRESENT (0x00000001)
53
54static int acpi_container_add(struct acpi_device *device); 52static int acpi_container_add(struct acpi_device *device);
55static int acpi_container_remove(struct acpi_device *device, int type); 53static int acpi_container_remove(struct acpi_device *device, int type);
56 54
@@ -75,13 +73,13 @@ static int is_device_present(acpi_handle handle)
75 73
76 status = acpi_get_handle(handle, "_STA", &temp); 74 status = acpi_get_handle(handle, "_STA", &temp);
77 if (ACPI_FAILURE(status)) 75 if (ACPI_FAILURE(status))
78 return 1; /* _STA not found, assmue device present */ 76 return 1; /* _STA not found, assume device present */
79 77
80 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 78 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
81 if (ACPI_FAILURE(status)) 79 if (ACPI_FAILURE(status))
82 return 0; /* Firmware error */ 80 return 0; /* Firmware error */
83 81
84 return ((sta & ACPI_STA_PRESENT) == ACPI_STA_PRESENT); 82 return ((sta & ACPI_STA_DEVICE_PRESENT) == ACPI_STA_DEVICE_PRESENT);
85} 83}
86 84
87/*******************************************************************/ 85/*******************************************************************/
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 99d1516d1e70..f7de02a6f497 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -70,8 +70,6 @@
70#define ACPI_PROCESSOR_LIMIT_USER 0 70#define ACPI_PROCESSOR_LIMIT_USER 0
71#define ACPI_PROCESSOR_LIMIT_THERMAL 1 71#define ACPI_PROCESSOR_LIMIT_THERMAL 1
72 72
73#define ACPI_STA_PRESENT 0x00000001
74
75#define _COMPONENT ACPI_PROCESSOR_COMPONENT 73#define _COMPONENT ACPI_PROCESSOR_COMPONENT
76ACPI_MODULE_NAME("processor_core"); 74ACPI_MODULE_NAME("processor_core");
77 75
@@ -779,7 +777,7 @@ static int is_processor_present(acpi_handle handle)
779 777
780 778
781 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); 779 status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
782 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_PRESENT)) { 780 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) {
783 ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present")); 781 ACPI_EXCEPTION((AE_INFO, status, "Processor Device is not present"));
784 return 0; 782 return 0;
785 } 783 }