Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: "Linux PM" <linux-pm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>,
	"Mika Westerberg" <mika.westerberg@linux.intel.com>,
	"Peixin Xie" <peixin.xie@linux.spacemit.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>,
	"Linux PCI" <linux-pci@vger.kernel.org>,
	"Bjorn Helgaas" <helgaas@kernel.org>,
	"Hans de Goede" <hansg@kernel.org>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 3/7] ACPI: bus: Drop initialized flag from struct acpi_device_flags
Date: Mon, 31 Aug 2026 19:59:23 +0200	[thread overview]
Message-ID: <3782570.R56niFO833@rafael.j.wysocki> (raw)
In-Reply-To: <3435655.aeNJFYEL58@rafael.j.wysocki>

From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>

After previous changes, the ACPI device object "initialized" flag is
not particularly useful.  It is set almost all the time and it is
only checked along with the "visited" flag, but checking the latter
is sufficient.

Drop it accordingly.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/scan.c     | 2 --
 include/acpi/acpi_bus.h | 5 ++---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c
index 5aa3ecb000e1..019a43e3b5d7 100644
--- a/drivers/acpi/scan.c
+++ b/drivers/acpi/scan.c
@@ -281,7 +281,6 @@ static int acpi_scan_check_and_detach(struct acpi_device *adev, void *p)
 	 * that.
 	 */
 	acpi_device_set_power(adev, ACPI_STATE_D3_COLD);
-	adev->flags.initialized = false;
 
 	/* For eject this is deferred to acpi_bus_post_eject() */
 	if (!(flags & ACPI_SCAN_CHECK_FLAG_EJECT)) {
@@ -1827,7 +1826,6 @@ void acpi_init_device_object(struct acpi_device *device, acpi_handle handle,
 	acpi_set_pnp_ids(handle, &device->pnp, type);
 	acpi_init_properties(device);
 	acpi_bus_get_flags(device);
-	device->flags.initialized = true;
 	device->flags.enumeration_by_parent =
 		acpi_device_enumeration_by_parent(device);
 	acpi_device_clear_enumerated(device);
diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h
index b0d9057ccb8a..596fbd748e88 100644
--- a/include/acpi/acpi_bus.h
+++ b/include/acpi/acpi_bus.h
@@ -180,7 +180,6 @@ struct acpi_device_flags {
 	u32 removable:1;
 	u32 ejectable:1;
 	u32 power_manageable:1;
-	u32 initialized:1;
 	u32 visited:1;
 	u32 hotplug_notify:1;
 	u32 is_dock_station:1;
@@ -189,7 +188,7 @@ struct acpi_device_flags {
 	u32 cca_seen:1;
 	u32 enumeration_by_parent:1;
 	u32 honor_deps:1;
-	u32 reserved:19;
+	u32 reserved:20;
 };
 
 /* File System */
@@ -654,7 +653,7 @@ void acpi_set_modalias(struct acpi_device *adev, const char *default_id,
 
 static inline bool acpi_device_enumerated(struct acpi_device *adev)
 {
-	return adev && adev->flags.initialized && adev->flags.visited;
+	return adev && adev->flags.visited;
 }
 
 /*
-- 
2.51.0





  parent reply	other threads:[~2026-08-31 18:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-31 16:20 [PATCH v1 0/7] ACPI: scan: Address power management initialization and PCI devices handling Rafael J. Wysocki
2026-08-31 16:24 ` [PATCH v1 1/7] ACPI: scan: Stop calling acpi_bus_init_power() early Rafael J. Wysocki
2026-09-01  8:27   ` Andy Shevchenko
2026-08-31 16:25 ` [PATCH v1 2/7] ACPI: PM: Introduce acpi_device_init_power() Rafael J. Wysocki
2026-09-01  8:29   ` Andy Shevchenko
2026-09-01 16:38     ` Rafael J. Wysocki (Intel)
2026-08-31 17:59 ` Rafael J. Wysocki [this message]
2026-08-31 17:59 ` [PATCH v1 4/7] ACPI: scan: Combine two conditionals in acpi_bus_attach() Rafael J. Wysocki
2026-09-01  8:40   ` Andy Shevchenko
2026-09-01 19:11     ` Rafael J. Wysocki (Intel)
2026-08-31 17:59 ` [PATCH v1 5/7] ACPI: scan: Add ACPI device "enumerated" marker Rafael J. Wysocki
2026-08-31 17:59 ` [PATCH v1 6/7] ACPI: scan: Adjust and rename acpi_bus_attach() Rafael J. Wysocki
2026-08-31 17:59 ` [PATCH v1 7/7] ACPI: scan: Take PCI device enumeration into account directly Rafael J. Wysocki
2026-09-01  8:44   ` Andy Shevchenko
2026-09-01 19:14     ` Rafael J. Wysocki (Intel)
2026-09-02 12:42 ` [PATCH v1 0/7] ACPI: scan: Address power management initialization and PCI devices handling Peixin Xie

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=3782570.R56niFO833@rafael.j.wysocki \
    --to=rafael@kernel.org \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=hansg@kernel.org \
    --cc=helgaas@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=mika.westerberg@linux.intel.com \
    --cc=peixin.xie@linux.spacemit.com \
    --cc=sakari.ailus@linux.intel.com \
    /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