From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Ard Biesheuvel <ardb@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
linux-efi@vger.kernel.org, Will Deacon <will@kernel.org>,
"Joerg Roedel (AMD)" <joro@8bytes.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Robin Murphy <robin.murphy@arm.com>,
iommu@lists.linux.dev, David Rhodes <david.rhodes@cirrus.com>,
Richard Fitzgerald <rf@opensource.cirrus.com>,
linux-sound@vger.kernel.org, patches@opensource.cirrus.com,
Shenghao Ding <shenghao-ding@ti.com>, Kevin Lu <kevin-lu@ti.com>,
Baojun Xu <baojun.xu@ti.com>, Sen Wang <sen@ti.com>
Subject: [PATCH v2 5/5] ACPI: bus: Drop acpi_get_first_physical_node()
Date: Wed, 30 Sep 2026 20:45:01 +0200 [thread overview]
Message-ID: <4537440.ejJDZkT8p0@rafael.j.wysocki> (raw)
In-Reply-To: <4766532.LvFx2qVVIh@rafael.j.wysocki>
From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Fold acpi_get_first_physical_node() into acpi_primary_dev_companion()
that is its only remaining caller and drop its signature from the
header file.
No intentional functional impact.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Sudeep Holla <sudeep.holla@kernel.org>
---
v1 -> v2:
* Add R-by from Sudeep
---
drivers/acpi/bus.c | 20 +++++---------------
include/linux/acpi.h | 7 -------
2 files changed, 5 insertions(+), 22 deletions(-)
diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 808c6746be14..cc6989d88645 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -809,24 +809,14 @@ struct device *acpi_bus_get_primary_device(struct acpi_device *adev)
}
EXPORT_SYMBOL_GPL(acpi_bus_get_primary_device);
-/**
- * acpi_get_first_physical_node - Find first physical node of an ACPI device
- * @adev: ACPI device in question
- *
- * Return: First physical node of ACPI device @adev
- */
-struct device *acpi_get_first_physical_node(struct acpi_device *adev)
-{
- guard(mutex)(&adev->physical_node_lock);
-
- return primary_physical_device(adev);
-}
-EXPORT_SYMBOL_GPL(acpi_get_first_physical_node);
-
static struct acpi_device *acpi_primary_dev_companion(struct acpi_device *adev,
const struct device *dev)
{
- const struct device *phys_dev = acpi_get_first_physical_node(adev);
+ const struct device *phys_dev;
+
+ guard(mutex)(&adev->physical_node_lock);
+
+ phys_dev = primary_physical_device(adev);
return phys_dev && phys_dev == dev ? adev : NULL;
}
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index ba5234bd93a2..6f69819f9c9a 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -105,8 +105,6 @@ static inline const char *acpi_dev_name(struct acpi_device *adev)
return dev_name(&adev->dev);
}
-struct device *acpi_get_first_physical_node(struct acpi_device *adev);
-
enum acpi_irq_model_id {
ACPI_IRQ_MODEL_PIC = 0,
ACPI_IRQ_MODEL_IOAPIC,
@@ -938,11 +936,6 @@ static inline const char *acpi_dev_name(struct acpi_device *adev)
return NULL;
}
-static inline struct device *acpi_get_first_physical_node(struct acpi_device *adev)
-{
- return NULL;
-}
-
static inline void acpi_early_init(void) { }
static inline void acpi_subsystem_init(void) { }
--
2.51.0
prev parent reply other threads:[~2026-09-30 18:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 18:30 [PATCH v2 0/5] ACPI: Replace acpi_get_first_physical_node() with acpi_bus_get_primary_device() Rafael J. Wysocki
2026-09-30 18:41 ` [PATCH v2 1/5] efi/dev-path-parser: Switch to use acpi_bus_get_primary_device() Rafael J. Wysocki
2026-09-30 18:42 ` [PATCH v2 3/5] ALSA: hda: cs35l41: " Rafael J. Wysocki
2026-10-01 6:21 ` Takashi Iwai
2026-09-30 18:42 ` [PATCH v2 4/5] ALSA: hda: tas2781: " Rafael J. Wysocki
2026-10-01 6:21 ` Takashi Iwai
2026-09-30 18:43 ` [PATCH v2 2/5] iommu/arm-smmu-v3: " Rafael J. Wysocki
2026-09-30 21:53 ` Nicolin Chen
2026-09-30 18:45 ` Rafael J. Wysocki [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4537440.ejJDZkT8p0@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=ardb@kernel.org \
--cc=baojun.xu@ti.com \
--cc=david.rhodes@cirrus.com \
--cc=ilias.apalodimas@linaro.org \
--cc=iommu@lists.linux.dev \
--cc=joro@8bytes.org \
--cc=kevin-lu@ti.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=rf@opensource.cirrus.com \
--cc=robin.murphy@arm.com \
--cc=sen@ti.com \
--cc=shenghao-ding@ti.com \
--cc=sudeep.holla@kernel.org \
--cc=tiwai@suse.com \
--cc=will@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®