From 5c9a27df4eb9a402770d5547af255a765e1c10ac Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 27 Mar 2023 18:03:19 +0200 Subject: [PATCH] driver core: move sysfs_dev_char_kobj out of class.h The structure sysfs_dev_char_kobj is local only to the driver core code, so move it out of the global class.h file and into the internal base.h file as no one else should be touching this symbol. Acked-by: Rafael J. Wysocki Link: https://lore.kernel.org/r/20230327160319.513974-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman --- drivers/base/base.h | 3 +++ include/linux/device/class.h | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/base/base.h b/drivers/base/base.h index d3e081dc4b133..2867ca4ee4ce6 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -189,6 +189,9 @@ const char *device_get_devnode(const struct device *dev, umode_t *mode, extern struct kset *devices_kset; void devices_kset_move_last(struct device *dev); +/* /sys/dev/char directory */ +extern struct kobject *sysfs_dev_char_kobj; + #if defined(CONFIG_MODULES) && defined(CONFIG_SYSFS) void module_add_driver(struct module *mod, struct device_driver *drv); void module_remove_driver(struct device_driver *drv); diff --git a/include/linux/device/class.h b/include/linux/device/class.h index 1dc7706cb42d8..d3960733c0fa8 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -81,7 +81,6 @@ struct class_dev_iter { }; extern struct kobject *sysfs_dev_block_kobj; -extern struct kobject *sysfs_dev_char_kobj; int __must_check class_register(struct class *class); void class_unregister(struct class *class); -- 2.30.2