mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-26 06:04:14 +08:00
gpio-amdpt: ACPI: Use the ACPI_COMPANION() macro directly
The ACPI_HANDLE() macro is a wrapper arond the ACPI_COMPANION() macro and the ACPI handle produced by the former comes from the ACPI device object produced by the latter, so it is way more straightforward to evaluate the latter directly instead of passing the handle produced by the former to acpi_bus_get_device(). Modify pt_gpio_probe() accordingly (no intentional functional impact). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Bartosz Golaszewski <brgl@bgdev.pl>
This commit is contained in:
parent
ae364fd917
commit
f0b2731ba7
@ -72,12 +72,10 @@ static void pt_gpio_free(struct gpio_chip *gc, unsigned offset)
|
||||
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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user