summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-11-13 16:35:44 +0000
committerMark Brown <broonie@kernel.org>2026-11-13 16:35:44 +0000
commit7862eeef462f768b087a1dd4391b3f02b44c2e7e (patch)
treedd88fd9bc65753965e84a26cc04c6f9936bd417b /include/linux
parent6a2da37cb61e94f19ed27e2b18c98caaa5466a77 (diff)
parentde7625abe4e92f1fb0047ed5f163b2ecaba77e50 (diff)
downloadlinux-next-7862eeef462f768b087a1dd4391b3f02b44c2e7e.tar.gz
linux-next-7862eeef462f768b087a1dd4391b3f02b44c2e7e.zip
Merge branch 'driver-core-next' of https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/debugfs.h5
-rw-r--r--include/linux/device.h10
2 files changed, 13 insertions, 2 deletions
diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h
index 4177c4738282..5fe583c19129 100644
--- a/include/linux/debugfs.h
+++ b/include/linux/debugfs.h
@@ -110,8 +110,9 @@ struct dentry *debugfs_create_file_short(const char *name, umode_t mode,
* you are responsible here.) If an error occurs, ERR_PTR(-ERROR) will be
* returned.
*
- * If debugfs is not enabled in the kernel, the value -%ENODEV will be
- * returned.
+ * If debugfs is not enabled in the kernel build, the value ERR_PTR(-ENODEV)
+ * will be returned. If debugfs is enabled in the kernel build but is disabled
+ * on the kernel command line, the value ERR_PTR(-EPERM) will be returned.
*
* If fops points to a struct debugfs_short_fops, then simple_open() will be
* used for the open, and only read/write/llseek are supported and are proxied,
diff --git a/include/linux/device.h b/include/linux/device.h
index 429e39f647cf..6b082c638d45 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -604,6 +604,10 @@ struct device_physical_location {
* ancestor device.
* @DEV_FLAG_OFFLINE_DISABLED: If set, the device is permanently online.
* @DEV_FLAG_OFFLINE: Set after successful invocation of bus type's .offline().
+ * @DEV_FLAG_SWNODE_NOTIFIED: Set if software_node_notify() was called for this
+ * device and took a reference to the device's software node.
+ * Indicates to software_node_notify_remove() that it should drop
+ * the reference.
* @DEV_FLAG_COUNT: Number of defined struct_device_flags.
*/
enum struct_device_flags {
@@ -617,6 +621,7 @@ enum struct_device_flags {
DEV_FLAG_OF_NODE_REUSED = 7,
DEV_FLAG_OFFLINE_DISABLED = 8,
DEV_FLAG_OFFLINE = 9,
+ DEV_FLAG_SWNODE_NOTIFIED = 10,
DEV_FLAG_COUNT
};
@@ -822,6 +827,10 @@ static inline void dev_assign_##accessor_name(struct device *dev, bool value) \
static inline bool dev_test_and_set_##accessor_name(struct device *dev) \
{ \
return test_and_set_bit(flag_name, dev->flags); \
+} \
+static inline bool dev_test_and_clear_##accessor_name(struct device *dev) \
+{ \
+ return test_and_clear_bit(flag_name, dev->flags); \
}
__create_dev_flag_accessors(ready_to_probe, DEV_FLAG_READY_TO_PROBE);
@@ -834,6 +843,7 @@ __create_dev_flag_accessors(dma_coherent, DEV_FLAG_DMA_COHERENT);
__create_dev_flag_accessors(of_node_reused, DEV_FLAG_OF_NODE_REUSED);
__create_dev_flag_accessors(offline_disabled, DEV_FLAG_OFFLINE_DISABLED);
__create_dev_flag_accessors(offline, DEV_FLAG_OFFLINE);
+__create_dev_flag_accessors(swnode_notified, DEV_FLAG_SWNODE_NOTIFIED);
#undef __create_dev_flag_accessors