Message ID | 4711815.31r3eYUQgx@kreacher (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | [v2,1/7] gpio-amdpt: ACPI: Use the ACPI_COMPANION() macro directly | expand |
Index: linux-pm/drivers/gpio/gpio-amdpt.c =================================================================== --- linux-pm.orig/drivers/gpio/gpio-amdpt.c +++ linux-pm/drivers/gpio/gpio-amdpt.c @@ -72,12 +72,10 @@ static void pt_gpio_free(struct gpio_chi static int pt_gpio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct acpi_device *acpi_dev; - acpi_handle handle = ACPI_HANDLE(dev); struct pt_gpio_chip *pt_gpio; int ret = 0; - if (acpi_bus_get_device(handle, &acpi_dev)) { + if (!ACPI_COMPANION(dev)) { dev_err(dev, "PT GPIO device node not found\n"); return -ENODEV; }