Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3386114rwe; Mon, 29 Aug 2022 10:37:19 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DEljAhRRyO4ToZitUA/AKdPRZmD0HRXFWX63EY7Bf9ZW9EMvqHbRojUQS67nfLQvtLQye X-Received: by 2002:a17:907:2c77:b0:741:5f0b:aff2 with SMTP id ib23-20020a1709072c7700b007415f0baff2mr6454447ejc.698.1661794639675; Mon, 29 Aug 2022 10:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661794639; cv=none; d=google.com; s=arc-20160816; b=DsF2oniBO9mktfo1GMr6l60ExjHPlsH+kM8iws34Q03GWfjMQ1JybN/hf1HGQUmP9t 8U+q3hulXsWSh87JqSI6Qk+3L1J49I1FjdyP2/1dyvl8Tf86CAzDRNkTmUd7U3GH1bfG Fr9RnvNaF8uVFRdF/yHPmjb5h2C6Yqmdw9QFFC+ss3aeBcdygy8uRgv4tTJnnmrMzUKe JLeGV5DJmBUB1czJKvThqfAX1aQ8DXNiWZRCB62BlHgdDZzCZyF4i15vZKhLJbA6wHVI jaLFFTLuk/X1146osG8/wImGYMz4F+jMUcdOj3Dj3gN2Tg9LMc9Ft6Nl4KEhdw16mr6K IUow== 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 :message-id:date:subject:cc:to:from; bh=KzQ08kMNutY88vWSy40dGC3ov+Z9mTrNuZWhzEjlQNs=; b=uhGOyxiaPN/aFHawgPGF5hTxSTuy2DSbyE/2FovgMQ6C9XUjL5WAjdLc6+b+tw3qjc s39OmLKaXu+HfkB2FwXfD9tYjLYZ+jrT4caF0dTwtq2ujVVWlX9qeWegldfSQC95fPIU EoeZwFBoNGRA4HqIyFT7nfLl6m6I5E+/acfEufvTSgwJucKafZqGGiT9SrKteLsS78Ku kgx5Eik37yBJHe9hQgHG1NAdr+W2TUzJ4O5PD1G7JuHaYEAzxzbZKdLlr4DGAfMalIdr UwuMn9RH9DqadGDvRzxhAhvmXNp8NyKvBUDBMvNQcP2h2dwBj/evVoN+PI58fECwO7d6 2AYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i5-20020a1709064fc500b007317d093e6csi7313709ejw.808.2022.08.29.10.36.54; Mon, 29 Aug 2022 10:37:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229731AbiH2QMk (ORCPT + 99 others); Mon, 29 Aug 2022 12:12:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbiH2QMh (ORCPT ); Mon, 29 Aug 2022 12:12:37 -0400 Received: from cloudserver094114.home.pl (cloudserver094114.home.pl [79.96.170.134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A6A673323; Mon, 29 Aug 2022 09:12:36 -0700 (PDT) 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 5.0.0) id 25f68f9ee1e36123; Mon, 29 Aug 2022 18:12:34 +0200 Received: from kreacher.localnet (public-gprs523165.centertel.pl [31.61.162.222]) (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 0945C66D25F; Mon, 29 Aug 2022 18:12:34 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Andy Shevchenko , Linux PM Subject: [PATCH v1] ACPI: property: Use acpi_dev_parent() Date: Mon, 29 Aug 2022 18:12:33 +0200 Message-ID: <4756666.GXAFRqVoOG@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 31.61.162.222 X-CLIENT-HOSTNAME: public-gprs523165.centertel.pl X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvfedrvdekuddgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvfevufffkfgggfgtsehtufertddttdejnecuhfhrohhmpedftfgrfhgrvghlucflrdcuhgihshhotghkihdfuceorhhjfiesrhhjfiihshhotghkihdrnhgvtheqnecuggftrfgrthhtvghrnhepffffffekgfehheffleetieevfeefvefhleetjedvvdeijeejledvieehueevueffnecukfhppeefuddriedurdduiedvrddvvddvnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepfedurdeiuddrudeivddrvddvvddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedpnhgspghrtghpthhtohepgedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhhihidrshhhvghvtghhvghnkhhosehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtoheplhhinhhugidqphhmsehvghgvrhdrkhgvrhhnvghlrdho rhhg X-DCC--Metrics: v370.home.net.pl 1024; Body=4 Fuz1=4 Fuz2=4 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki After introducing acpi_dev_parent() in commit 62fcb99bdf10 ("ACPI: Drop parent field from struct acpi_device"), it is better to use it instead of accessing the dev.parent field in struct acpi_device directly. Modify acpi_node_get_parent() accordingly. Suggested-by: Andy Shevchenko Signed-off-by: Rafael J. Wysocki --- drivers/acpi/property.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) Index: linux-pm/drivers/acpi/property.c =================================================================== --- linux-pm.orig/drivers/acpi/property.c +++ linux-pm/drivers/acpi/property.c @@ -1269,10 +1269,11 @@ acpi_node_get_parent(const struct fwnode return to_acpi_data_node(fwnode)->parent; } if (is_acpi_device_node(fwnode)) { - struct device *dev = to_acpi_device_node(fwnode)->dev.parent; + struct acpi_device *parent; - if (dev) - return acpi_fwnode_handle(to_acpi_device(dev)); + parent = acpi_dev_parent(to_acpi_device_node(fwnode)); + if (parent) + return acpi_fwnode_handle(parent); } return NULL;