Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3609903pxb; Wed, 13 Oct 2021 09:19:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxf/uzHir8z4UiYyMjWMjHTKYpTokf+HUibEEBoogGs08oyfvwPSniz9d2PbOYgddZR4T2I X-Received: by 2002:a17:902:c214:b0:13f:1b2a:8011 with SMTP id 20-20020a170902c21400b0013f1b2a8011mr156741pll.3.1634141951613; Wed, 13 Oct 2021 09:19:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634141951; cv=none; d=google.com; s=arc-20160816; b=cFH7qiLHsJJgyoOxF4ND1LwBxY+0OgJCYg9CSYz9olkhXva3E3wsfHY5m9a91KApy7 wu3PecVW9f9ekDP91Adm6c0wucz+aSCMYBAbwOO3AS2MN3zp37+fDyWMykKQeWdiBQ0H +TA8VrSpzGWPBB91HH+u3FEhm/KRYIBJNyyjjGdckarFSKCXtJLCcYjv/2Lbk9I3JM7r 3VbOXLzqeut2rvQNXsgcdbZuHbAc/XQXW5x01JyoB0HYc2v7wTt9A3yQnHoJ51S0BmOW 4sfmB24l0leTsa4uHfmqMzsgKCM1GzQig1dnO1yWIl3CQjFp0kTGLDItLAZIUQUaq3v8 0dVw== 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=X5YYAu1UZw4PXFjYMNoHkYQ8eUuGc5IwXv+ut1fx794=; b=RFEvdbMGM7a+CSuGcJhsb1hV551WC1xG6MMC+pBod+RpMpiIvHGujMdvWK9eAy8JRT bW+6D9FNG8OnpyT8A+xn4GlgsZxNhzjOWwkr8j/yH9L30KXJZ4OfotHU450DkgnaQPAt zGE0/9y3AWYiWWScfjC6y+MJHhY2G73DQwhS38eeJQj27I7lcUbOnXxyVbgbhhqNnvaL 3rfTR5BkNhlp8SQ9SbUiWLJl08APppPIFQKWmbww9XqR6Q2LM+DjkhbDyQP95sRg6iY2 i5z6ukUBjCWcFc0FR0Ep3Pp8hEcWWJRRXM9OquQpFQPKqq5XOqa0QkHAScURxaj0M+Bn Yk6A== 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 k7si8262657pjj.5.2021.10.13.09.18.40; Wed, 13 Oct 2021 09:19:11 -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 S237763AbhJMQS7 (ORCPT + 99 others); Wed, 13 Oct 2021 12:18:59 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:55442 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229785AbhJMQSp (ORCPT ); Wed, 13 Oct 2021 12:18:45 -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 2c11d38a76026872; Wed, 13 Oct 2021 18:16:40 +0200 Received: from kreacher.localnet (unknown [213.134.161.244]) (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 DE37066A871; Wed, 13 Oct 2021 18:16:39 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Linus Walleij , Bartosz Golaszewski , linux-gpio@vger.kernel.org Subject: [PATCH v2 1/7] gpio-amdpt: ACPI: Use the ACPI_COMPANION() macro directly Date: Wed, 13 Oct 2021 18:06:40 +0200 Message-ID: <4711815.31r3eYUQgx@kreacher> In-Reply-To: <2179627.iZASKD2KPV@kreacher> References: <4369779.LvFx2qVVIh@kreacher> <2179627.iZASKD2KPV@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.161.244 X-CLIENT-HOSTNAME: 213.134.161.244 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrvddutddgleejucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpedvjeelgffhiedukedtleekkedvudfggefhgfegjefgueekjeelvefggfdvledutdenucfkphepvddufedrudefgedrudeiuddrvdeggeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrdduiedurddvgeegpdhhvghlohepkhhrvggrtghhvghrrdhlohgtrghlnhgvthdpmhgrihhlfhhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqpdhrtghpthhtoheplhhinhhugidqrggtphhisehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhugidqkhgvrhhnvghlsehvghgvrhdrkhgvrhhnvghlrdhorhhgpdhrtghpthhtoheplhhinhhushdrfigrlhhlvghijheslhhinhgrrhhordhorhhgpdhrtghpthhtohepsghrghhlsegsghguvghvrdhplhdprhgtphhtthhopehlihhnuhigqdhgphhiohesvhhgvghrrdhk vghrnhgvlhdrohhrgh 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 Acked-by: Bartosz Golaszewski --- v1 -> v2: * Resend with a different From and S-o-b address and with ACK from Bart. No other changes. --- 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; }