summaryrefslogtreecommitdiffstats
path: root/drivers/base/base.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2007-11-28 12:23:18 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-24 20:40:35 -0800
commitc63469a3985a9771c18a916b8d42845d044ea0b1 (patch)
tree7d54c8741aec9d71864203ce430d289d40c4c975 /drivers/base/base.h
parentcbe9c595f1de2e2a98403be2c14bfbc2486e84c4 (diff)
downloadtalos-obmc-linux-c63469a3985a9771c18a916b8d42845d044ea0b1.tar.gz
talos-obmc-linux-c63469a3985a9771c18a916b8d42845d044ea0b1.zip
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>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r--drivers/base/base.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h
index ca6d273064f8..05472360f6a2 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -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
OpenPOWER on IntegriCloud