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

Configure Feed

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

Merge tag 'acpi-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fixes from Rafael Wysocki:
"These fix up the ACPI IRQ override quirk list and add two new entries
to it, add a new quirk to the ACPI backlight (video) driver, and fix
the ACPI battery driver.

Specifics:

- Add a quirk for Dell OptiPlex 5480 AIO to the ACPI backlight
(video) driver (Hans de Goede)

- Prevent the ACPI battery driver from crashing when unregistering a
battery hook and simplify battery hook locking in it (Armin Wolf)

- Fix up the ACPI IRQ override quirk list and add quirks for Asus
Vivobook X1704VAP and Asus ExpertBook B2502CVA to it (Hans de
Goede)"

* tag 'acpi-6.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
ACPI: battery: Fix possible crash when unregistering a battery hook
ACPI: battery: Simplify battery hook locking
ACPI: video: Add backlight=native quirk for Dell OptiPlex 5480 AIO
ACPI: resource: Add Asus ExpertBook B2502CVA to irq1_level_low_skip_override[]
ACPI: resource: Add Asus Vivobook X1704VAP to irq1_level_low_skip_override[]
ACPI: resource: Loosen the Asus E1404GAB DMI match to also cover the E1404GA
ACPI: resource: Remove duplicate Asus E1504GAB IRQ override

+43 -21
+17 -11
drivers/acpi/battery.c
··· 703 703 static LIST_HEAD(battery_hook_list); 704 704 static DEFINE_MUTEX(hook_mutex); 705 705 706 - static void __battery_hook_unregister(struct acpi_battery_hook *hook, int lock) 706 + static void battery_hook_unregister_unlocked(struct acpi_battery_hook *hook) 707 707 { 708 708 struct acpi_battery *battery; 709 + 709 710 /* 710 711 * In order to remove a hook, we first need to 711 712 * de-register all the batteries that are registered. 712 713 */ 713 - if (lock) 714 - mutex_lock(&hook_mutex); 715 714 list_for_each_entry(battery, &acpi_battery_list, list) { 716 715 if (!hook->remove_battery(battery->bat, hook)) 717 716 power_supply_changed(battery->bat); 718 717 } 719 - list_del(&hook->list); 720 - if (lock) 721 - mutex_unlock(&hook_mutex); 718 + list_del_init(&hook->list); 719 + 722 720 pr_info("extension unregistered: %s\n", hook->name); 723 721 } 724 722 725 723 void battery_hook_unregister(struct acpi_battery_hook *hook) 726 724 { 727 - __battery_hook_unregister(hook, 1); 725 + mutex_lock(&hook_mutex); 726 + /* 727 + * Ignore already unregistered battery hooks. This might happen 728 + * if a battery hook was previously unloaded due to an error when 729 + * adding a new battery. 730 + */ 731 + if (!list_empty(&hook->list)) 732 + battery_hook_unregister_unlocked(hook); 733 + 734 + mutex_unlock(&hook_mutex); 728 735 } 729 736 EXPORT_SYMBOL_GPL(battery_hook_unregister); 730 737 ··· 740 733 struct acpi_battery *battery; 741 734 742 735 mutex_lock(&hook_mutex); 743 - INIT_LIST_HEAD(&hook->list); 744 736 list_add(&hook->list, &battery_hook_list); 745 737 /* 746 738 * Now that the driver is registered, we need ··· 756 750 * hooks. 757 751 */ 758 752 pr_err("extension failed to load: %s", hook->name); 759 - __battery_hook_unregister(hook, 0); 753 + battery_hook_unregister_unlocked(hook); 760 754 goto end; 761 755 } 762 756 ··· 810 804 */ 811 805 pr_err("error in extension, unloading: %s", 812 806 hook_node->name); 813 - __battery_hook_unregister(hook_node, 0); 807 + battery_hook_unregister_unlocked(hook_node); 814 808 } 815 809 } 816 810 mutex_unlock(&hook_mutex); ··· 843 837 * need to remove the hooks. 844 838 */ 845 839 list_for_each_entry_safe(hook, ptr, &battery_hook_list, list) { 846 - __battery_hook_unregister(hook, 1); 840 + battery_hook_unregister(hook); 847 841 } 848 842 mutex_destroy(&hook_mutex); 849 843 }
+17 -10
drivers/acpi/resource.c
··· 441 441 }, 442 442 }, 443 443 { 444 + /* Asus Vivobook X1704VAP */ 445 + .matches = { 446 + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 447 + DMI_MATCH(DMI_BOARD_NAME, "X1704VAP"), 448 + }, 449 + }, 450 + { 444 451 /* Asus ExpertBook B1402CBA */ 445 452 .matches = { 446 453 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), ··· 511 504 }, 512 505 }, 513 506 { 514 - /* Asus Vivobook Go E1404GAB */ 507 + /* Asus ExpertBook B2502CVA */ 515 508 .matches = { 516 509 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 517 - DMI_MATCH(DMI_BOARD_NAME, "E1404GAB"), 510 + DMI_MATCH(DMI_BOARD_NAME, "B2502CVA"), 518 511 }, 519 512 }, 520 513 { 521 - /* Asus Vivobook E1504GA */ 514 + /* Asus Vivobook Go E1404GA* */ 515 + .matches = { 516 + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 517 + DMI_MATCH(DMI_BOARD_NAME, "E1404GA"), 518 + }, 519 + }, 520 + { 521 + /* Asus Vivobook E1504GA* */ 522 522 .matches = { 523 523 DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 524 524 DMI_MATCH(DMI_BOARD_NAME, "E1504GA"), 525 - }, 526 - }, 527 - { 528 - /* Asus Vivobook E1504GAB */ 529 - .matches = { 530 - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), 531 - DMI_MATCH(DMI_BOARD_NAME, "E1504GAB"), 532 525 }, 533 526 }, 534 527 {
+9
drivers/acpi/video_detect.c
··· 845 845 * which need native backlight control nevertheless. 846 846 */ 847 847 { 848 + /* https://github.com/zabbly/linux/issues/26 */ 849 + .callback = video_detect_force_native, 850 + /* Dell OptiPlex 5480 AIO */ 851 + .matches = { 852 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), 853 + DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 5480 AIO"), 854 + }, 855 + }, 856 + { 848 857 /* https://bugzilla.redhat.com/show_bug.cgi?id=2303936 */ 849 858 .callback = video_detect_force_native, 850 859 /* Dell OptiPlex 7760 AIO */