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:
@@ -73,3 +73,12 @@ extern char *make_class_name(const char *name, struct kobject *kobj);
|
||||
extern int devres_release_all(struct device *dev);
|
||||
|
||||
extern struct kset *devices_kset;
|
||||
|
||||
#ifdef CONFIG_MODULES
|
||||
extern void module_add_driver(struct module *mod, struct device_driver *drv);
|
||||
extern void module_remove_driver(struct device_driver *drv);
|
||||
#else
|
||||
static inline void module_add_driver(struct module *mod,
|
||||
struct device_driver *drv) { }
|
||||
static inline void module_remove_driver(struct device_driver *drv) { }
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user