aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDanilo Krummrich <dakr@kernel.org>2026-04-21 01:40:44 +0200
committerDanilo Krummrich <dakr@kernel.org>2026-04-29 00:38:54 +0200
commit9db268212e0d7c7e3c4aef3494e55afbc1695b1f (patch)
tree6df82f6aa354047b641a087aaefdcb4a130ec06a /include/linux
parente9506871a8ea304cde48ff4a57226df2aadddae3 (diff)
driver core: move dev_has_sync_state() to drivers/base/base.h
All callers of dev_has_sync_state() are in drivers/base/ and any attempt to use it outside of driver-core should require good justification, so there is no need to have it defined in include/linux/device.h. Thus, move it to drivers/base/base.h. Suggested-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Link: https://lore.kernel.org/driver-core/CAJZ5v0jkm9K9=-U_51FMsyxN2msdouRnz4sEjmxG0Btd6Hmw0w@mail.gmail.com/ Reviewed-by: Rafael J. Wysocki (Intel) <rafael@kernel.org> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260420234153.2898532-1-dakr@kernel.org Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/device.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 56a96e41d2c9..d54c86d77764 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -1061,20 +1061,6 @@ static inline void device_lock_assert(struct device *dev)
lockdep_assert_held(&dev->mutex);
}
-static inline bool dev_has_sync_state(struct device *dev)
-{
- struct device_driver *drv;
-
- if (!dev)
- return false;
- drv = READ_ONCE(dev->driver);
- if (drv && drv->sync_state)
- return true;
- if (dev->bus && dev->bus->sync_state)
- return true;
- return false;
-}
-
static inline int dev_set_drv_sync_state(struct device *dev,
void (*fn)(struct device *dev))
{