Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2663959pxb; Tue, 12 Oct 2021 10:54:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUh2pcS/VnlNR0CpNIC++VDiY9e90HlqmU2D19Ec6jc49CeWi+aFZZyxprl/Bv/9jEUlPS X-Received: by 2002:a17:907:75e4:: with SMTP id jz4mr30586816ejc.106.1634061273915; Tue, 12 Oct 2021 10:54:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634061273; cv=none; d=google.com; s=arc-20160816; b=erqpQbAelD7rRW9QQlFjIq4sJbr8ZKXndcpfiVOx02ke4aXbuQecEGGfah0SK3DpAM dMC1cdlbFXXAZ7jzXeSOA1/iFc4YamKGraOF/4azVBhc6Y2u/9AjXNrDCPx0fyVfRBxR M4sgYvZbL6LU5h2i51O/3acj6EMs4rXPCbPs+22dJC0ld288NTT0YIKMd2mrja/CYOsd vywQn6vzjPVyH3JzpqeisGjzHRiWxpiF8NOfNLvQiHb6efQCAxSq/OTGnJGdduOI4tGa OBtZ20M4iyrk1dM2HM5PjktQ8g1sTUh/PO3ckEJPuGTxo0YDjJ7vKnAQQcOwtT8kd3h9 f2nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1TLIO5y8+xN4FNceBCwuO2g9g04pimW479AoiNTm6Fc=; b=vCJBP5UeKEb6ARRX+vUeYBTZIH4QVRToUbbeyJZUy0jwJysiHRS1ozWRHwaLEDHwsQ l459y3+7TuVTXdAivBqspvzyRW+zWwBXs3aEFct8K18nTf2xw2q40XdAZRnSmrUxK2xx kFn/OqjXAw7o1Ehn2Xi8+pyoF+KQlbTedk/BRWl1RCAbLOM3WpVPkRk2IAWpZsk9NZNn bbkrAMTnQb/MLNSlELuPGOdJYkRQ4Qp/i+p3m5cLPNo2cAS5GEc65dWnM3xsbfo8cRVi 8Nyt2ylbskvDPS4Le2MmbbwPXDyK4TQUsqmL63EFO+XwbiZJMpBshUjp79XSqjiRYRrA oOog== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y17si16497460edm.70.2021.10.12.10.54.10; Tue, 12 Oct 2021 10:54:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233352AbhJLRxx (ORCPT + 99 others); Tue, 12 Oct 2021 13:53:53 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:46916 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233033AbhJLRxY (ORCPT ); Tue, 12 Oct 2021 13:53:24 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 3.0.0) id bcfb80dd1b5e0b5c; Tue, 12 Oct 2021 19:51:20 +0200 Received: from kreacher.localnet (unknown [213.134.187.88]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id A58A166A819; Tue, 12 Oct 2021 19:51:19 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org Subject: [PATCH v1 1/7] gpio-amdpt: ACPI: Use the ACPI_COMPANION() macro directly Date: Tue, 12 Oct 2021 19:44:08 +0200 Message-ID: <2179627.iZASKD2KPV@kreacher> In-Reply-To: <4369779.LvFx2qVVIh@kreacher> References: <4369779.LvFx2qVVIh@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.187.88 X-CLIENT-HOSTNAME: 213.134.187.88 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtkedgudduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppedvudefrddufeegrddukeejrdekkeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeejrdekkedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhhsrdifrghllhgvihhjsehlihhnrghrohdrohhrghdprhgtphhtthhopegsrhhglhessghguggvvhdrphhlpdhrtghpthhtoheplhhinhhugidqghhpihhosehvghgvrhdrkhgv rhhnvghlrdhorhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=5 Fuz1=5 Fuz2=5 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki 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 --- drivers/gpio/gpio-amdpt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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; }