Lines Matching refs:mk
23 static void module_create_drivers_dir(struct module_kobject *mk) in module_create_drivers_dir() argument
28 if (mk && !mk->drivers_dir) in module_create_drivers_dir()
29 mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); in module_create_drivers_dir()
37 struct module_kobject *mk = NULL; in module_add_driver() local
43 mk = &mod->mkobj; in module_add_driver()
50 mk = container_of(mkobj, struct module_kobject, kobj); in module_add_driver()
52 drv->p->mkobj = mk; in module_add_driver()
58 if (!mk) in module_add_driver()
62 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); in module_add_driver()
65 module_create_drivers_dir(mk); in module_add_driver()
66 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, in module_add_driver()
74 struct module_kobject *mk = NULL; in module_remove_driver() local
83 mk = &drv->owner->mkobj; in module_remove_driver()
85 mk = drv->p->mkobj; in module_remove_driver()
86 if (mk && mk->drivers_dir) { in module_remove_driver()
89 sysfs_remove_link(mk->drivers_dir, driver_name); in module_remove_driver()