]> Git Repo - linux.git/blobdiff - drivers/platform/x86/intel/vbtn.c
platform/x86: amd-pmc: Move to later in the suspend process
[linux.git] / drivers / platform / x86 / intel / vbtn.c
index 15f013af9e623684034a2c89809b4e61fe6813e2..c5e4e35c8d204317e98d1df2087c6a70a3687e83 100644 (file)
@@ -384,12 +384,9 @@ static acpi_status __init
 check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
 {
        const struct acpi_device_id *ids = context;
-       struct acpi_device *dev;
+       struct acpi_device *dev = acpi_fetch_acpi_dev(handle);
 
-       if (acpi_bus_get_device(handle, &dev) != 0)
-               return AE_OK;
-
-       if (acpi_match_device_ids(dev, ids) == 0)
+       if (dev && acpi_match_device_ids(dev, ids) == 0)
                if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
                        dev_info(&dev->dev,
                                 "intel-vbtn: created platform device\n");
This page took 0.028007 seconds and 4 git commands to generate.