Commit b65d5630 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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
...@@ -113,7 +113,7 @@ ...@@ -113,7 +113,7 @@
the GPE dispatcher. the GPE dispatcher.
This facility can be used to prevent such uncontrolled This facility can be used to prevent such uncontrolled
GPE floodings. GPE floodings.
Format: <int> Format: <byte>
acpi_no_auto_serialize [HW,ACPI] acpi_no_auto_serialize [HW,ACPI]
Disable auto-serialization of AML methods Disable auto-serialization of AML methods
......
...@@ -153,7 +153,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data) ...@@ -153,7 +153,7 @@ int acpi_bus_get_private_data(acpi_handle handle, void **data)
{ {
acpi_status status; acpi_status status;
if (!*data) if (!data)
return -EINVAL; return -EINVAL;
status = acpi_get_data(handle, acpi_bus_private_data_handler, data); status = acpi_get_data(handle, acpi_bus_private_data_handler, data);
......
...@@ -77,6 +77,19 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids); ...@@ -77,6 +77,19 @@ MODULE_DEVICE_TABLE(acpi, button_device_ids);
/* Please keep this list sorted alphabetically by vendor and model */ /* Please keep this list sorted alphabetically by vendor and model */
static const struct dmi_system_id dmi_lid_quirks[] = { static const struct dmi_system_id dmi_lid_quirks[] = {
{
/*
* Acer Switch 10 SW5-012. _LID method messes with home and
* power button GPIO IRQ settings causing an interrupt storm on
* both GPIOs. This is unfixable without a DSDT override, so we
* have to disable the lid-switch functionality altogether :|
*/
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Acer"),
DMI_MATCH(DMI_PRODUCT_NAME, "Aspire SW5-012"),
},
.driver_data = (void *)(long)ACPI_BUTTON_LID_INIT_DISABLED,
},
{ {
/* /*
* Asus T200TA, _LID keeps reporting closed after every second * Asus T200TA, _LID keeps reporting closed after every second
......
...@@ -819,14 +819,14 @@ static ssize_t counter_set(struct kobject *kobj, ...@@ -819,14 +819,14 @@ static ssize_t counter_set(struct kobject *kobj,
* interface: * interface:
* echo unmask > /sys/firmware/acpi/interrupts/gpe00 * echo unmask > /sys/firmware/acpi/interrupts/gpe00
*/ */
#define ACPI_MASKABLE_GPE_MAX 0xFF #define ACPI_MASKABLE_GPE_MAX 0x100
static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata; static DECLARE_BITMAP(acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) __initdata;
static int __init acpi_gpe_set_masked_gpes(char *val) static int __init acpi_gpe_set_masked_gpes(char *val)
{ {
u8 gpe; u8 gpe;
if (kstrtou8(val, 0, &gpe) || gpe > ACPI_MASKABLE_GPE_MAX) if (kstrtou8(val, 0, &gpe))
return -EINVAL; return -EINVAL;
set_bit(gpe, acpi_masked_gpes_map); set_bit(gpe, acpi_masked_gpes_map);
...@@ -838,7 +838,7 @@ void __init acpi_gpe_apply_masked_gpes(void) ...@@ -838,7 +838,7 @@ void __init acpi_gpe_apply_masked_gpes(void)
{ {
acpi_handle handle; acpi_handle handle;
acpi_status status; acpi_status status;
u8 gpe; u16 gpe;
for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) { for_each_set_bit(gpe, acpi_masked_gpes_map, ACPI_MASKABLE_GPE_MAX) {
status = acpi_get_gpe_device(gpe, &handle); status = acpi_get_gpe_device(gpe, &handle);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment