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 <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230327160319.513974-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2023-03-27 18:03:19 +02:00
parent 579d472b37
commit 5c9a27df4e
2 changed files with 3 additions and 1 deletions

View File

@ -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);

View File

@ -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);