Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2665394pxb; Tue, 12 Oct 2021 10:56:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyROnsp5gdeXGnJDfH2Gvop6FVVk3UZZ7S4JTaAMv8gIb4l3u5DVlJ2/HzD2Y2M7hh47xeX X-Received: by 2002:a17:906:b884:: with SMTP id hb4mr33643334ejb.376.1634061378717; Tue, 12 Oct 2021 10:56:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634061378; cv=none; d=google.com; s=arc-20160816; b=PChtoW61d5PJ1H21Fy4YiD4ezT6xyOnjgGDW8QyHeE/7HZmT6cNFA8wnijCIDk/B9e 5n31SLF5dA8N1t9hc4OdrNKWTReKBwIEYTngyVu2Q4L9D4ihXD0t4128PxJnKzUFQBjK fRyo54MmfYs9+iH5/4W7+U7iLrMigetV+7aDzyv5QoQ+/CDjyF2mgPhlIaqB3bLmrnU9 Oat88OFRJSeowJNSU8kHxk8KeSrMs/9fx/SxaRFRlj24S2L5qwzhhUSx8TV1Mrjv7KzT RZXUeuLPyTjv/1cugtvRtrIBQx7Ah1XPeYlVw+wUuJa6iL289HGgtoflqbE2a8UxO7bE 7kJw== 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=XwiBM4XUYbI2zzJwtGkbpX5sKcT/zupy8ZGydZQ1PZU=; b=k81KO4Vx2DIBdbPKgZGJRVmyDs8utZsptHBK0nnMQfpGgqod6YgTEOUcOBWc4n2jTN y8k3ZZ2/phuP2ZG5/1tAIrC7WeTIyptdArnngTNn5r4L3qax4mgILjd1PqxRbBxtRzjC CBL810dVTGKuMUe9uBm2AVdxjeyGZ1+D/DlIbWkoPWEq2ohF53j+r1EnswuyWwDbGMU7 iu0Z/Yf7Z6liiiWFky1JECeXriIHu6hRJkYVsSL0ErlxAAMtwDVpFjv9NyG6oKbWoXee 4LHc5JtaRCuSD7PwLsuJPyvJliBUYgGzKMEzKynmYfXRfGt/j/kb0zHZci9tr9NA+e5S rrow== 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 o2si25109623ejy.80.2021.10.12.10.55.53; Tue, 12 Oct 2021 10:56:18 -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 S233488AbhJLRxn (ORCPT + 99 others); Tue, 12 Oct 2021 13:53:43 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:47782 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233005AbhJLRxU (ORCPT ); Tue, 12 Oct 2021 13:53:20 -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 a23f0dacc78f34f5; Tue, 12 Oct 2021 19:51:17 +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 6AC1C66A819; Tue, 12 Oct 2021 19:51:16 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Elie Morisse , Nehal Shah , Shyam Sundar S K , linux-i2c@vger.kernel.org Subject: [PATCH v1 3/7] i2c: i2c-amd-mp2-plat: ACPI: Use ACPI_COMPANION() directly Date: Tue, 12 Oct 2021 19:44:33 +0200 Message-ID: <3647069.kQq0lBPeGt@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: gggruggvucftvghtrhhoucdtuddrgedvtddrvddtkedgudduhecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfjqffogffrnfdpggftiffpkfenuceurghilhhouhhtmecuudehtdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujfgurhephffvufffkfgjfhgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepvdejlefghfeiudektdelkeekvddugfeghffggeejgfeukeejleevgffgvdeluddtnecukfhppedvudefrddufeegrddukeejrdekkeenucevlhhushhtvghrufhiiigvpedunecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeejrdekkedphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehshihnihhurhhgvgesghhmrghilhdrtghomhdprhgtphhtthhopehnvghhrghlqdgsrghkuhhltghhrghnughrrgdrshhhrghhsegrmhgurdgtohhmpdhrtghpthhtohepshhhhigrmhdq shhunhgurghrrdhsqdhksegrmhgurdgtohhmpdhrtghpthhtoheplhhinhhugidqihdvtgesvhhgvghrrdhkvghrnhgvlhdrohhrgh X-DCC--Metrics: v370.home.net.pl 1024; Body=6 Fuz1=6 Fuz2=6 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 i2c_amd_probe() accordingly (no intentional functional impact). Signed-off-by: Rafael J. Wysocki --- drivers/i2c/busses/i2c-amd-mp2-plat.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) Index: linux-pm/drivers/i2c/busses/i2c-amd-mp2-plat.c =================================================================== --- linux-pm.orig/drivers/i2c/busses/i2c-amd-mp2-plat.c +++ linux-pm/drivers/i2c/busses/i2c-amd-mp2-plat.c @@ -246,12 +246,11 @@ static int i2c_amd_probe(struct platform { int ret; struct amd_i2c_dev *i2c_dev; - acpi_handle handle = ACPI_HANDLE(&pdev->dev); - struct acpi_device *adev; + struct acpi_device *adev = ACPI_COMPANION(&pdev->dev); struct amd_mp2_dev *mp2_dev; const char *uid; - if (acpi_bus_get_device(handle, &adev)) + if (!adev) return -ENODEV; /* The ACPI namespace doesn't contain information about which MP2 PCI