diff options
author | 2020-03-08 10:39:40 -0500 | |
---|---|---|
committer | 2020-03-08 10:39:40 -0500 | |
commit | b34e5c13327ef723362c88c43da176a439badeea (patch) | |
tree | 01c2f2ecee284b0f8ee098bd2af3c54ff91b067b /include/linux/device.h | |
parent | Merge tag 'tty-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty (diff) | |
parent | driver core: Skip unnecessary work when device doesn't have sync_state() (diff) | |
download | wireguard-linux-b34e5c13327ef723362c88c43da176a439badeea.tar.xz wireguard-linux-b34e5c13327ef723362c88c43da176a439badeea.zip |
Merge tag 'driver-core-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core and debugfs fixes from Greg KH:
"Here are four small driver core / debugfs patches for 5.6-rc3:
- debugfs api cleanup now that all debugfs_create_regset32() callers
have been fixed up. This was waiting until after the -rc1 merge as
these fixes came in through different trees
- driver core sync state fixes based on reports of minor issues found
in the feature
All of these have been in linux-next with no reported issues"
* tag 'driver-core-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
driver core: Skip unnecessary work when device doesn't have sync_state()
driver core: Add dev_has_sync_state()
driver core: Call sync_state() even if supplier has no consumers
debugfs: remove return value of debugfs_create_regset32()
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 0cd7c647c16c..fa04dfd22bbc 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -798,6 +798,17 @@ static inline struct device_node *dev_of_node(struct device *dev) return dev->of_node; } +static inline bool dev_has_sync_state(struct device *dev) +{ + if (!dev) + return false; + if (dev->driver && dev->driver->sync_state) + return true; + if (dev->bus && dev->bus->sync_state) + return true; + return false; +} + /* * High level routines for use by the bus drivers */ |