summaryrefslogtreecommitdiffstats
path: root/drivers/base/module.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/module.c')
-rw-r--r--drivers/base/module.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/base/module.c b/drivers/base/module.c
index cad07be5de1a..103be9cacb05 100644
--- a/drivers/base/module.c
+++ b/drivers/base/module.c
@@ -50,7 +50,7 @@ void module_add_driver(struct module *mod, struct device_driver *drv)
if (mkobj) {
mk = container_of(mkobj, struct module_kobject, kobj);
/* remember our module structure */
- drv->mkobj = mk;
+ drv->p->mkobj = mk;
/* kset_find_obj took a reference */
kobject_put(mkobj);
}
@@ -60,11 +60,11 @@ void module_add_driver(struct module *mod, struct device_driver *drv)
return;
/* Don't check return codes; these calls are idempotent */
- no_warn = sysfs_create_link(&drv->kobj, &mk->kobj, "module");
+ no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module");
driver_name = make_driver_name(drv);
if (driver_name) {
module_create_drivers_dir(mk);
- no_warn = sysfs_create_link(mk->drivers_dir, &drv->kobj,
+ no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj,
driver_name);
kfree(driver_name);
}
@@ -78,12 +78,12 @@ void module_remove_driver(struct device_driver *drv)
if (!drv)
return;
- sysfs_remove_link(&drv->kobj, "module");
+ sysfs_remove_link(&drv->p->kobj, "module");
if (drv->owner)
mk = &drv->owner->mkobj;
- else if (drv->mkobj)
- mk = drv->mkobj;
+ else if (drv->p->mkobj)
+ mk = drv->p->mkobj;
if (mk && mk->drivers_dir) {
driver_name = make_driver_name(drv);
if (driver_name) {