Skip to content

Commit b65d563

Browse files
committed
Merge branches 'acpi-bus', 'acpi-button', 'acpi-sysfs' and 'acpi-misc'
* acpi-bus: ACPI: bus: Fix NULL pointer check in acpi_bus_get_private_data() * acpi-button: ACPI: button: Add DMI quirk for Acer Switch 10 SW5-032 lid-switch * acpi-sysfs: ACPI: sysfs: Change ACPI_MASKABLE_GPE_MAX to 0x100 * acpi-misc: ACPI: Fix Kconfig indentation
5 parents 833a426 + 627ead7 + 90ed9c6 + a7583e7 + feb1740 commit b65d563

File tree

5 files changed

+22
-9
lines changed

5 files changed

+22
-9
lines changed

Documentation/admin-guide/kernel-parameters.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
the GPE dispatcher.
114114
This facility can be used to prevent such uncontrolled
115115
GPE floodings.
116-
Format: <int>
116+
Format: <byte>
117117

118118
acpi_no_auto_serialize [HW,ACPI]
119119
Disable auto-serialization of AML methods

drivers/acpi/Kconfig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,9 @@ config ACPI_PROCFS_POWER
104104
depends on X86 && PROC_FS
105105
help
106106
For backwards compatibility, this option allows
107-
deprecated power /proc/acpi/ directories to exist, even when
108-
they have been replaced by functions in /sys.
109-
The deprecated directories (and their replacements) include:
107+
deprecated power /proc/acpi/ directories to exist, even when
108+
they have been replaced by functions in /sys.
109+
The deprecated directories (and their replacements) include:
110110
/proc/acpi/battery/* (/sys/class/power_supply/*) and
111111
/proc/acpi/ac_adapter/* (sys/class/power_supply/*).
112112
This option has no effect on /proc/acpi/ directories
@@ -448,7 +448,7 @@ config ACPI_CUSTOM_METHOD
448448
config ACPI_BGRT
449449
bool "Boottime Graphics Resource Table support"
450450
depends on EFI && (X86 || ARM64)
451-
help
451+
help
452452
This driver adds support for exposing the ACPI Boottime Graphics
453453
Resource Table, which allows the operating system to obtain
454454
data from the firmware boot splash. It will appear under

drivers/acpi/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
153153
{
154154
acpi_status status;
155155

156-
if (!*data)
156+
if (!data)
157157
return -EINVAL;
158158

159159
status = acpi_get_data(handle, acpi_bus_private_data_handler, data);

drivers/acpi/button.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,19 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
7777

7878
/* Please keep this list sorted alphabetically by vendor and model */
7979
static const struct dmi_system_id dmi_lid_quirks[] = {
80+
{
81+
/*
82+
* Acer Switch 10 SW5-012. _LID method messes with home and
83+
* power button GPIO IRQ settings causing an interrupt storm on
84+
* both GPIOs. This is unfixable without a DSDT override, so we
85+
* have to disable the lid-switch functionality altogether :|
86+
*/
87+
.matches = {
88+
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
89+
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
90+
},
91+
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
92+
},
8093
{
8194
/*
8295
* Asus T200TA, _LID keeps reporting closed after every second

drivers/acpi/sysfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -819,14 +819,14 @@ static ssize_t counter_set(struct kobject *kobj,
819819
* interface:
820820
* echo unmask > /sys/firmware/acpi/interrupts/gpe00
821821
*/
822-
#define ACPI_MASKABLE_GPE_MAX 0xFF
822+
#define ACPI_MASKABLE_GPE_MAX 0x100
823823
static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
824824

825825
static int __init acpi_gpe_set_masked_gpes(char *val)
826826
{
827827
u8 gpe;
828828

829-
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX)
829+
if (kstrtou8(val, 0, &gpe))
830830
return -EINVAL;
831831
set_bit(gpe, acpi_masked_gpes_map);
832832

@@ -838,7 +838,7 @@ void __init acpi_gpe_apply_masked_gpes(void)
838838
{
839839
acpi_handle handle;
840840
acpi_status status;
841-
u8 gpe;
841+
u16 gpe;
842842

843843
for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
844844
status = acpi_get_gpe_device(gpe, &handle);

0 commit comments

Comments
 (0)