From: "Rafael J. Wysocki" <rafael@kernel.org>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Hans de Goede <hansg@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Danilo Krummrich <dakr@kernel.org>,
driver-core@lists.linux.dev
Subject: [PATCH v2 1/8] driver core: auxiliary bus: Introduce dev_is_auxiliary()
Date: Fri, 13 Mar 2026 13:53:03 +0100 [thread overview]
Message-ID: <5079467.GXAFRqVoOG@rafael.j.wysocki> (raw)
In-Reply-To: <6271415.lOV4Wx5bFT@rafael.j.wysocki>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Introduce dev_is_auxiliary() in analogy with dev_is_platform() to
facilitate subsequent changes.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
Danilo, Greg, please let me know if you have objections or concerns
regarding this one.
The new function is used in the next patch to limit the scope of the
search when looking for duplicates of the device being probed.
---
drivers/base/auxiliary.c | 10 ++++++++++
include/linux/auxiliary_bus.h | 2 ++
2 files changed, 12 insertions(+)
--- a/drivers/base/auxiliary.c
+++ b/drivers/base/auxiliary.c
@@ -502,6 +502,16 @@ struct auxiliary_device *__devm_auxiliar
}
EXPORT_SYMBOL_GPL(__devm_auxiliary_device_create);
+/**
+ * dev_is_auxiliary - check if the device is an auxiliary one
+ * @dev: device to check
+ */
+bool dev_is_auxiliary(struct device *dev)
+{
+ return dev->bus == &auxiliary_bus_type;
+}
+EXPORT_SYMBOL_GPL(dev_is_auxiliary);
+
void __init auxiliary_bus_init(void)
{
WARN_ON(bus_register(&auxiliary_bus_type));
--- a/include/linux/auxiliary_bus.h
+++ b/include/linux/auxiliary_bus.h
@@ -271,6 +271,8 @@ struct auxiliary_device *__devm_auxiliar
__devm_auxiliary_device_create(dev, KBUILD_MODNAME, devname, \
platform_data, 0)
+bool dev_is_auxiliary(struct device *dev);
+
/**
* module_auxiliary_driver() - Helper macro for registering an auxiliary driver
* @__auxiliary_driver: auxiliary driver struct
next prev parent reply other threads:[~2026-03-13 13:04 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 12:47 [PATCH v2 0/8] ACPI: driver: Cleanups and fixes, mostly related to acpi_device_name/class() Rafael J. Wysocki
2026-03-13 12:53 ` Rafael J. Wysocki [this message]
2026-03-13 14:02 ` [PATCH v2 1/8] driver core: auxiliary bus: Introduce dev_is_auxiliary() Greg Kroah-Hartman
2026-03-13 14:09 ` Danilo Krummrich
2026-03-13 12:56 ` [PATCH v2 2/8] ACPI: video: Rework checking for duplicate video bus devices Rafael J. Wysocki
2026-03-13 14:08 ` Danilo Krummrich
2026-03-13 12:57 ` [PATCH v2 3/8] ACPI: video: Consolidate pnp.bus_id workarounds handling Rafael J. Wysocki
2026-03-13 12:58 ` [PATCH v2 4/8] ACPI: driver: Do not set acpi_device_name() unnecessarily Rafael J. Wysocki
2026-03-13 12:59 ` [PATCH v2 5/8] ACPI: event: Redefine acpi_notifier_call_chain() Rafael J. Wysocki
2026-03-13 12:59 ` [PATCH v2 6/8] ACPI: driver: Avoid using pnp.device_class for netlink handling Rafael J. Wysocki
2026-03-13 13:00 ` [PATCH v2 7/8] ACPI: driver: Do not set acpi_device_class() unnecessarily Rafael J. Wysocki
2026-03-13 13:03 ` [PATCH v2 8/8] ACPI: AC: Define ACPI_AC_CLASS in one place Rafael J. Wysocki
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=5079467.GXAFRqVoOG@rafael.j.wysocki \
--to=rafael@kernel.org \
--cc=dakr@kernel.org \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=hansg@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.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