Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branches 'acpi-ec' and 'acpi-processor'

* acpi-ec:
ACPI / EC: Process rather than discard events in acpi_ec_clear

* acpi-processor:
ACPI / processor: Fix failure of loading acpi-cpufreq driver

+16 -12
+4 -3
drivers/acpi/acpi_processor.c
··· 170 170 acpi_status status; 171 171 int ret; 172 172 173 + if (pr->apic_id == -1) 174 + return -ENODEV; 175 + 173 176 status = acpi_evaluate_integer(pr->handle, "_STA", NULL, &sta); 174 177 if (ACPI_FAILURE(status) || !(sta & ACPI_STA_DEVICE_PRESENT)) 175 178 return -ENODEV; ··· 263 260 } 264 261 265 262 apic_id = acpi_get_apicid(pr->handle, device_declaration, pr->acpi_id); 266 - if (apic_id < 0) { 263 + if (apic_id < 0) 267 264 acpi_handle_debug(pr->handle, "failed to get CPU APIC ID.\n"); 268 - return -ENODEV; 269 - } 270 265 pr->apic_id = apic_id; 271 266 272 267 cpu_index = acpi_map_cpuid(pr->apic_id, pr->acpi_id);
+12 -9
drivers/acpi/ec.c
··· 206 206 spin_unlock_irqrestore(&ec->lock, flags); 207 207 } 208 208 209 - static int acpi_ec_sync_query(struct acpi_ec *ec); 209 + static int acpi_ec_sync_query(struct acpi_ec *ec, u8 *data); 210 210 211 211 static int ec_check_sci_sync(struct acpi_ec *ec, u8 state) 212 212 { 213 213 if (state & ACPI_EC_FLAG_SCI) { 214 214 if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) 215 - return acpi_ec_sync_query(ec); 215 + return acpi_ec_sync_query(ec, NULL); 216 216 } 217 217 return 0; 218 218 } ··· 443 443 444 444 EXPORT_SYMBOL(ec_get_handle); 445 445 446 - static int acpi_ec_query_unlocked(struct acpi_ec *ec, u8 *data); 447 - 448 446 /* 449 - * Clears stale _Q events that might have accumulated in the EC. 447 + * Process _Q events that might have accumulated in the EC. 450 448 * Run with locked ec mutex. 451 449 */ 452 450 static void acpi_ec_clear(struct acpi_ec *ec) ··· 453 455 u8 value = 0; 454 456 455 457 for (i = 0; i < ACPI_EC_CLEAR_MAX; i++) { 456 - status = acpi_ec_query_unlocked(ec, &value); 458 + status = acpi_ec_sync_query(ec, &value); 457 459 if (status || !value) 458 460 break; 459 461 } ··· 580 582 kfree(handler); 581 583 } 582 584 583 - static int acpi_ec_sync_query(struct acpi_ec *ec) 585 + static int acpi_ec_sync_query(struct acpi_ec *ec, u8 *data) 584 586 { 585 587 u8 value = 0; 586 588 int status; 587 589 struct acpi_ec_query_handler *handler, *copy; 588 - if ((status = acpi_ec_query_unlocked(ec, &value))) 590 + 591 + status = acpi_ec_query_unlocked(ec, &value); 592 + if (data) 593 + *data = value; 594 + if (status) 589 595 return status; 596 + 590 597 list_for_each_entry(handler, &ec->list, node) { 591 598 if (value == handler->query_bit) { 592 599 /* have custom handler for this bit */ ··· 615 612 if (!ec) 616 613 return; 617 614 mutex_lock(&ec->mutex); 618 - acpi_ec_sync_query(ec); 615 + acpi_ec_sync_query(ec, NULL); 619 616 mutex_unlock(&ec->mutex); 620 617 } 621 618