aboutsummaryrefslogtreecommitdiffstats
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)
50 if (mkobj) { 50 if (mkobj) {
51 mk = container_of(mkobj, struct module_kobject, kobj); 51 mk = container_of(mkobj, struct module_kobject, kobj);
52 /* remember our module structure */ 52 /* remember our module structure */
53 drv->mkobj = mk; 53 drv->p->mkobj = mk;
54 /* kset_find_obj took a reference */ 54 /* kset_find_obj took a reference */
55 kobject_put(mkobj); 55 kobject_put(mkobj);
56 } 56 }
@@ -60,11 +60,11 @@ void module_add_driver(struct module *mod, struct device_driver *drv)
60 return; 60 return;
61 61
62 /* Don't check return codes; these calls are idempotent */ 62 /* Don't check return codes; these calls are idempotent */
63 no_warn = sysfs_create_link(&drv->kobj, &mk->kobj, "module"); 63 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module");
64 driver_name = make_driver_name(drv); 64 driver_name = make_driver_name(drv);
65 if (driver_name) { 65 if (driver_name) {
66 module_create_drivers_dir(mk); 66 module_create_drivers_dir(mk);
67 no_warn = sysfs_create_link(mk->drivers_dir, &drv->kobj, 67 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj,
68 driver_name); 68 driver_name);
69 kfree(driver_name); 69 kfree(driver_name);
70 } 70 }
@@ -78,12 +78,12 @@ void module_remove_driver(struct device_driver *drv)
78 if (!drv) 78 if (!drv)
79 return; 79 return;
80 80
81 sysfs_remove_link(&drv->kobj, "module"); 81 sysfs_remove_link(&drv->p->kobj, "module");
82 82
83 if (drv->owner) 83 if (drv->owner)
84 mk = &drv->owner->mkobj; 84 mk = &drv->owner->mkobj;
85 else if (drv->mkobj) 85 else if (drv->p->mkobj)
86 mk = drv->mkobj; 86 mk = drv->p->mkobj;
87 if (mk && mk->drivers_dir) { 87 if (mk && mk->drivers_dir) {
88 driver_name = make_driver_name(drv); 88 driver_name = make_driver_name(drv);
89 if (driver_name) { 89 if (driver_name) {