Merge branches 'acpi-pci', 'acpi-misc' and 'acpi-tools'
* acpi-pci: ACPI,PCI,IRQ: remove SCI penalize function ACPI,PCI,IRQ: remove redundant code in acpi_irq_penalty_init() ACPI,PCI,IRQ: reduce static IRQ array size to 16 ACPI,PCI,IRQ: reduce resource requirements * acpi-misc: ACPI / sysfs: fix error code in get_status() ACPI / device_sysfs: Clean up checkpatch errors ACPI / device_sysfs: Change _SUN and _STA show functions error return to EIO ACPI / device_sysfs: Add sysfs support for _HRV hardware revision arm64: defconfig: Enable ACPI ACPI / ARM64: Remove EXPERT dependency for ACPI on ARM64 ACPI / ARM64: Don't enable ACPI by default on ARM64 acer-wmi: Use acpi_dev_found() eeepc-wmi: Use acpi_dev_found() ACPI / utils: Rename acpi_dev_present() * acpi-tools: tools/power/acpi: close file only if it is open
This commit is contained in:
@@ -793,15 +793,6 @@ static acpi_status __init AMW0_find_mailled(void)
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static int AMW0_set_cap_acpi_check_device_found __initdata;
|
||||
|
||||
static acpi_status __init AMW0_set_cap_acpi_check_device_cb(acpi_handle handle,
|
||||
u32 level, void *context, void **retval)
|
||||
{
|
||||
AMW0_set_cap_acpi_check_device_found = 1;
|
||||
return AE_OK;
|
||||
}
|
||||
|
||||
static const struct acpi_device_id norfkill_ids[] __initconst = {
|
||||
{ "VPC2004", 0},
|
||||
{ "IBM0068", 0},
|
||||
@@ -816,9 +807,10 @@ static int __init AMW0_set_cap_acpi_check_device(void)
|
||||
const struct acpi_device_id *id;
|
||||
|
||||
for (id = norfkill_ids; id->id[0]; id++)
|
||||
acpi_get_devices(id->id, AMW0_set_cap_acpi_check_device_cb,
|
||||
NULL, NULL);
|
||||
return AMW0_set_cap_acpi_check_device_found;
|
||||
if (acpi_dev_found(id->id))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static acpi_status __init AMW0_set_capabilities(void)
|
||||
|
@@ -204,30 +204,10 @@ static void eeepc_wmi_key_filter(struct asus_wmi_driver *asus_wmi, int *code,
|
||||
}
|
||||
}
|
||||
|
||||
static acpi_status eeepc_wmi_parse_device(acpi_handle handle, u32 level,
|
||||
void *context, void **retval)
|
||||
{
|
||||
pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
|
||||
*(bool *)context = true;
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
|
||||
static int eeepc_wmi_check_atkd(void)
|
||||
{
|
||||
acpi_status status;
|
||||
bool found = false;
|
||||
|
||||
status = acpi_get_devices(EEEPC_ACPI_HID, eeepc_wmi_parse_device,
|
||||
&found, NULL);
|
||||
|
||||
if (ACPI_FAILURE(status) || !found)
|
||||
return 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int eeepc_wmi_probe(struct platform_device *pdev)
|
||||
{
|
||||
if (eeepc_wmi_check_atkd()) {
|
||||
if (acpi_dev_found(EEEPC_ACPI_HID)) {
|
||||
pr_warn("Found legacy ATKD device (%s)\n", EEEPC_ACPI_HID);
|
||||
pr_warn("WMI device present, but legacy ATKD device is also "
|
||||
"present and enabled\n");
|
||||
pr_warn("You probably booted with acpi_osi=\"Linux\" or "
|
||||
|
Referens i nytt ärende
Block a user