mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pin-yen Lin <treapking@chromium.org>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Danilo Krummrich <dakr@kernel.org>,
	Saravana Kannan <saravanak@google.com>
Cc: Hsin-Te Yuan <yuanhsinte@chromium.org>,
	linux-pm@vger.kernel.org, Chen-Yu Tsai <wenst@chromium.org>,
	linux-kernel@vger.kernel.org,
	Pin-yen Lin <treapking@chromium.org>
Subject: [PATCH v2 1/2] driver core: Export device_link_flag_is_sync_state_only()
Date: Thu, 11 Sep 2025 19:16:02 +0800	[thread overview]
Message-ID: <20250911112058.3610201-1-treapking@chromium.org> (raw)

Export device_link_flag_is_sync_state_only() for future patches.

Signed-off-by: Pin-yen Lin <treapking@chromium.org>

---

Changes in v2:
- New in v2

 drivers/base/core.c    | 3 ++-
 include/linux/device.h | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index d22d6b23e758..cc6af9b0d59d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -287,10 +287,11 @@ static bool device_is_ancestor(struct device *dev, struct device *target)
 #define DL_MARKER_FLAGS		(DL_FLAG_INFERRED | \
 				 DL_FLAG_CYCLE | \
 				 DL_FLAG_MANAGED)
-static inline bool device_link_flag_is_sync_state_only(u32 flags)
+bool device_link_flag_is_sync_state_only(u32 flags)
 {
 	return (flags & ~DL_MARKER_FLAGS) == DL_FLAG_SYNC_STATE_ONLY;
 }
+EXPORT_SYMBOL_GPL(device_link_flag_is_sync_state_only);
 
 /**
  * device_is_dependent - Check if one device depends on another one
diff --git a/include/linux/device.h b/include/linux/device.h
index 0470d19da7f2..e27d0bf7c43d 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1197,6 +1197,7 @@ const char *dev_driver_string(const struct device *dev);
 struct device_link *device_link_add(struct device *consumer,
 				    struct device *supplier, u32 flags);
 void device_link_del(struct device_link *link);
+bool device_link_flag_is_sync_state_only(u32 flags);
 void device_link_remove(void *consumer, struct device *supplier);
 void device_links_supplier_sync_state_pause(void);
 void device_links_supplier_sync_state_resume(void);
-- 
2.51.0.384.g4c02a37b29-goog


             reply	other threads:[~2025-09-11 11:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-11 11:16 Pin-yen Lin [this message]
2025-09-11 11:16 ` [PATCH v2 2/2] PM: sleep: Don't wait for SYNC_STATE_ONLY device links Pin-yen Lin
2025-09-11 12:28   ` Greg Kroah-Hartman
2025-09-11 12:49     ` Rafael J. Wysocki
2025-09-11 12:28 ` [PATCH v2 1/2] driver core: Export device_link_flag_is_sync_state_only() Greg Kroah-Hartman
2025-09-11 12:50 ` 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=20250911112058.3610201-1-treapking@chromium.org \
    --to=treapking@chromium.org \
    --cc=dakr@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=wenst@chromium.org \
    --cc=yuanhsinte@chromium.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®