mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
Driver core: move the driver specific module code into the driver core
The module driver specific code should belong in the driver core, not in the kernel/ directory. So move this code. This is done in preparation for some struct device_driver rework that should be confined to the driver core code only. This also lets us keep from exporting these functions, as no external code should ever be calling it. Thanks to Andrew Morton for the !CONFIG_MODULES fix. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
cbe9c595f1
commit
c63469a398
5 changed files with 104 additions and 102 deletions
|
@ -609,21 +609,6 @@ static inline void module_remove_modinfo_attrs(struct module *mod)
|
|||
|
||||
#endif /* CONFIG_SYSFS */
|
||||
|
||||
#if defined(CONFIG_SYSFS) && defined(CONFIG_MODULES)
|
||||
|
||||
void module_add_driver(struct module *mod, struct device_driver *drv);
|
||||
void module_remove_driver(struct device_driver *drv);
|
||||
|
||||
#else /* not both CONFIG_SYSFS && CONFIG_MODULES */
|
||||
|
||||
static inline void module_add_driver(struct module *mod, struct device_driver *drv)
|
||||
{ }
|
||||
|
||||
static inline void module_remove_driver(struct device_driver *drv)
|
||||
{ }
|
||||
|
||||
#endif
|
||||
|
||||
#define symbol_request(x) try_then_request_module(symbol_get(x), "symbol:" #x)
|
||||
|
||||
/* BELOW HERE ALL THESE ARE OBSOLETE AND WILL VANISH */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue