diff options
author | Len Brown <len.brown@intel.com> | 2006-06-15 15:37:09 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2006-06-15 15:37:09 -0400 |
commit | 63518472c05a351d779f35803e6ccfb361ae630a (patch) | |
tree | d3668e960f945a7a1204cfb839bc8aaabcdf2341 | |
parent | e44e20ff1273cf96c7f195297208f654c49295cf (diff) | |
parent | e6f1f3c54974a30c65ea0b699809d12f0aa04272 (diff) |
Pull trivial1 into release branch
-rw-r--r-- | drivers/acpi/asus_acpi.c | 10 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 10 | ||||
-rw-r--r-- | drivers/acpi/scan.c | 36 | ||||
-rw-r--r-- | drivers/acpi/sleep/wakeup.c | 3 | ||||
-rw-r--r-- | include/asm-i386/apicdef.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/apicdef.h | 2 |
6 files changed, 23 insertions, 39 deletions
diff --git a/drivers/acpi/asus_acpi.c b/drivers/acpi/asus_acpi.c index 216c072dee5e..1a545489e859 100644 --- a/drivers/acpi/asus_acpi.c +++ b/drivers/acpi/asus_acpi.c | |||
@@ -817,7 +817,7 @@ typedef int (proc_writefunc) (struct file * file, const char __user * buffer, | |||
817 | unsigned long count, void *data); | 817 | unsigned long count, void *data); |
818 | 818 | ||
819 | static int | 819 | static int |
820 | __init asus_proc_add(char *name, proc_writefunc * writefunc, | 820 | asus_proc_add(char *name, proc_writefunc * writefunc, |
821 | proc_readfunc * readfunc, mode_t mode, | 821 | proc_readfunc * readfunc, mode_t mode, |
822 | struct acpi_device *device) | 822 | struct acpi_device *device) |
823 | { | 823 | { |
@@ -836,7 +836,7 @@ __init asus_proc_add(char *name, proc_writefunc * writefunc, | |||
836 | return 0; | 836 | return 0; |
837 | } | 837 | } |
838 | 838 | ||
839 | static int __init asus_hotk_add_fs(struct acpi_device *device) | 839 | static int asus_hotk_add_fs(struct acpi_device *device) |
840 | { | 840 | { |
841 | struct proc_dir_entry *proc; | 841 | struct proc_dir_entry *proc; |
842 | mode_t mode; | 842 | mode_t mode; |
@@ -954,7 +954,7 @@ static void asus_hotk_notify(acpi_handle handle, u32 event, void *data) | |||
954 | * This function is used to initialize the hotk with right values. In this | 954 | * This function is used to initialize the hotk with right values. In this |
955 | * method, we can make all the detection we want, and modify the hotk struct | 955 | * method, we can make all the detection we want, and modify the hotk struct |
956 | */ | 956 | */ |
957 | static int __init asus_hotk_get_info(void) | 957 | static int asus_hotk_get_info(void) |
958 | { | 958 | { |
959 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | 959 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; |
960 | struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; | 960 | struct acpi_buffer dsdt = { ACPI_ALLOCATE_BUFFER, NULL }; |
@@ -1101,7 +1101,7 @@ static int __init asus_hotk_get_info(void) | |||
1101 | return AE_OK; | 1101 | return AE_OK; |
1102 | } | 1102 | } |
1103 | 1103 | ||
1104 | static int __init asus_hotk_check(void) | 1104 | static int asus_hotk_check(void) |
1105 | { | 1105 | { |
1106 | int result = 0; | 1106 | int result = 0; |
1107 | 1107 | ||
@@ -1119,7 +1119,7 @@ static int __init asus_hotk_check(void) | |||
1119 | return result; | 1119 | return result; |
1120 | } | 1120 | } |
1121 | 1121 | ||
1122 | static int __init asus_hotk_add(struct acpi_device *device) | 1122 | static int asus_hotk_add(struct acpi_device *device) |
1123 | { | 1123 | { |
1124 | acpi_status status = AE_OK; | 1124 | acpi_status status = AE_OK; |
1125 | int result; | 1125 | int result; |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index 713b763884a9..e5041c4f3c2c 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -388,7 +388,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device) | |||
388 | 388 | ||
389 | /* Use the acpiid in MADT to map cpus in case of SMP */ | 389 | /* Use the acpiid in MADT to map cpus in case of SMP */ |
390 | #ifndef CONFIG_SMP | 390 | #ifndef CONFIG_SMP |
391 | #define convert_acpiid_to_cpu(acpi_id) (0xff) | 391 | #define convert_acpiid_to_cpu(acpi_id) (-1) |
392 | #else | 392 | #else |
393 | 393 | ||
394 | #ifdef CONFIG_IA64 | 394 | #ifdef CONFIG_IA64 |
@@ -401,7 +401,7 @@ static int acpi_processor_remove_fs(struct acpi_device *device) | |||
401 | #define ARCH_BAD_APICID (0xff) | 401 | #define ARCH_BAD_APICID (0xff) |
402 | #endif | 402 | #endif |
403 | 403 | ||
404 | static u8 convert_acpiid_to_cpu(u8 acpi_id) | 404 | static int convert_acpiid_to_cpu(u8 acpi_id) |
405 | { | 405 | { |
406 | u16 apic_id; | 406 | u16 apic_id; |
407 | int i; | 407 | int i; |
@@ -427,7 +427,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
427 | acpi_status status = 0; | 427 | acpi_status status = 0; |
428 | union acpi_object object = { 0 }; | 428 | union acpi_object object = { 0 }; |
429 | struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; | 429 | struct acpi_buffer buffer = { sizeof(union acpi_object), &object }; |
430 | u8 cpu_index; | 430 | int cpu_index; |
431 | static int cpu0_initialized; | 431 | static int cpu0_initialized; |
432 | 432 | ||
433 | ACPI_FUNCTION_TRACE("acpi_processor_get_info"); | 433 | ACPI_FUNCTION_TRACE("acpi_processor_get_info"); |
@@ -473,7 +473,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
473 | cpu_index = convert_acpiid_to_cpu(pr->acpi_id); | 473 | cpu_index = convert_acpiid_to_cpu(pr->acpi_id); |
474 | 474 | ||
475 | /* Handle UP system running SMP kernel, with no LAPIC in MADT */ | 475 | /* Handle UP system running SMP kernel, with no LAPIC in MADT */ |
476 | if (!cpu0_initialized && (cpu_index == 0xff) && | 476 | if (!cpu0_initialized && (cpu_index == -1) && |
477 | (num_online_cpus() == 1)) { | 477 | (num_online_cpus() == 1)) { |
478 | cpu_index = 0; | 478 | cpu_index = 0; |
479 | } | 479 | } |
@@ -487,7 +487,7 @@ static int acpi_processor_get_info(struct acpi_processor *pr) | |||
487 | * less than the max # of CPUs. They should be ignored _iff | 487 | * less than the max # of CPUs. They should be ignored _iff |
488 | * they are physically not present. | 488 | * they are physically not present. |
489 | */ | 489 | */ |
490 | if (cpu_index >= NR_CPUS) { | 490 | if (cpu_index == -1) { |
491 | if (ACPI_FAILURE | 491 | if (ACPI_FAILURE |
492 | (acpi_processor_hotadd_init(pr->handle, &pr->id))) { | 492 | (acpi_processor_hotadd_init(pr->handle, &pr->id))) { |
493 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, | 493 | ACPI_DEBUG_PRINT((ACPI_DB_ERROR, |
diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 95d5bc2acadd..a5fa85832fa3 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c | |||
@@ -234,12 +234,9 @@ static int acpi_bus_get_power_flags(struct acpi_device *device) | |||
234 | 234 | ||
235 | int acpi_match_ids(struct acpi_device *device, char *ids) | 235 | int acpi_match_ids(struct acpi_device *device, char *ids) |
236 | { | 236 | { |
237 | int error = 0; | ||
238 | struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; | ||
239 | |||
240 | if (device->flags.hardware_id) | 237 | if (device->flags.hardware_id) |
241 | if (strstr(ids, device->pnp.hardware_id)) | 238 | if (strstr(ids, device->pnp.hardware_id)) |
242 | goto Done; | 239 | return 0; |
243 | 240 | ||
244 | if (device->flags.compatible_ids) { | 241 | if (device->flags.compatible_ids) { |
245 | struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; | 242 | struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; |
@@ -248,15 +245,10 @@ int acpi_match_ids(struct acpi_device *device, char *ids) | |||
248 | /* compare multiple _CID entries against driver ids */ | 245 | /* compare multiple _CID entries against driver ids */ |
249 | for (i = 0; i < cid_list->count; i++) { | 246 | for (i = 0; i < cid_list->count; i++) { |
250 | if (strstr(ids, cid_list->id[i].value)) | 247 | if (strstr(ids, cid_list->id[i].value)) |
251 | goto Done; | 248 | return 0; |
252 | } | 249 | } |
253 | } | 250 | } |
254 | error = -ENOENT; | 251 | return -ENOENT; |
255 | |||
256 | Done: | ||
257 | if (buffer.pointer) | ||
258 | acpi_os_free(buffer.pointer); | ||
259 | return error; | ||
260 | } | 252 | } |
261 | 253 | ||
262 | static acpi_status | 254 | static acpi_status |
@@ -642,21 +634,19 @@ EXPORT_SYMBOL(acpi_bus_register_driver); | |||
642 | */ | 634 | */ |
643 | int acpi_bus_unregister_driver(struct acpi_driver *driver) | 635 | int acpi_bus_unregister_driver(struct acpi_driver *driver) |
644 | { | 636 | { |
645 | int error = 0; | ||
646 | |||
647 | ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver"); | 637 | ACPI_FUNCTION_TRACE("acpi_bus_unregister_driver"); |
648 | 638 | ||
649 | if (driver) { | 639 | if (!driver) |
650 | acpi_driver_detach(driver); | 640 | return_VALUE(-EINVAL); |
651 | 641 | ||
652 | if (!atomic_read(&driver->references)) { | 642 | acpi_driver_detach(driver); |
653 | spin_lock(&acpi_device_lock); | 643 | |
654 | list_del_init(&driver->node); | 644 | if (!atomic_read(&driver->references)) { |
655 | spin_unlock(&acpi_device_lock); | 645 | spin_lock(&acpi_device_lock); |
656 | } | 646 | list_del_init(&driver->node); |
657 | } else | 647 | spin_unlock(&acpi_device_lock); |
658 | error = -EINVAL; | 648 | } |
659 | return_VALUE(error); | 649 | return_VALUE(0); |
660 | } | 650 | } |
661 | 651 | ||
662 | EXPORT_SYMBOL(acpi_bus_unregister_driver); | 652 | EXPORT_SYMBOL(acpi_bus_unregister_driver); |
diff --git a/drivers/acpi/sleep/wakeup.c b/drivers/acpi/sleep/wakeup.c index 85df0ceda2a9..af1dbabaf0b1 100644 --- a/drivers/acpi/sleep/wakeup.c +++ b/drivers/acpi/sleep/wakeup.c | |||
@@ -155,7 +155,6 @@ static int __init acpi_wakeup_device_init(void) | |||
155 | 155 | ||
156 | if (acpi_disabled) | 156 | if (acpi_disabled) |
157 | return 0; | 157 | return 0; |
158 | printk("ACPI wakeup devices: \n"); | ||
159 | 158 | ||
160 | spin_lock(&acpi_device_lock); | 159 | spin_lock(&acpi_device_lock); |
161 | list_for_each_safe(node, next, &acpi_wakeup_device_list) { | 160 | list_for_each_safe(node, next, &acpi_wakeup_device_list) { |
@@ -174,10 +173,8 @@ static int __init acpi_wakeup_device_init(void) | |||
174 | dev->wakeup.state.enabled = 1; | 173 | dev->wakeup.state.enabled = 1; |
175 | spin_lock(&acpi_device_lock); | 174 | spin_lock(&acpi_device_lock); |
176 | } | 175 | } |
177 | printk("%4s ", dev->pnp.bus_id); | ||
178 | } | 176 | } |
179 | spin_unlock(&acpi_device_lock); | 177 | spin_unlock(&acpi_device_lock); |
180 | printk("\n"); | ||
181 | 178 | ||
182 | return 0; | 179 | return 0; |
183 | } | 180 | } |
diff --git a/include/asm-i386/apicdef.h b/include/asm-i386/apicdef.h index 5e4a35af2921..9f6995341fdc 100644 --- a/include/asm-i386/apicdef.h +++ b/include/asm-i386/apicdef.h | |||
@@ -121,7 +121,6 @@ | |||
121 | */ | 121 | */ |
122 | #define u32 unsigned int | 122 | #define u32 unsigned int |
123 | 123 | ||
124 | #define lapic ((volatile struct local_apic *)APIC_BASE) | ||
125 | 124 | ||
126 | struct local_apic { | 125 | struct local_apic { |
127 | 126 | ||
diff --git a/include/asm-x86_64/apicdef.h b/include/asm-x86_64/apicdef.h index 5a48e9bcf218..1dd40067c67c 100644 --- a/include/asm-x86_64/apicdef.h +++ b/include/asm-x86_64/apicdef.h | |||
@@ -137,8 +137,6 @@ | |||
137 | */ | 137 | */ |
138 | #define u32 unsigned int | 138 | #define u32 unsigned int |
139 | 139 | ||
140 | #define lapic ((volatile struct local_apic *)APIC_BASE) | ||
141 | |||
142 | struct local_apic { | 140 | struct local_apic { |
143 | 141 | ||
144 | /*000*/ struct { u32 __reserved[4]; } __reserved_01; | 142 | /*000*/ struct { u32 __reserved[4]; } __reserved_01; |