Lines Matching refs:mk
25 static void module_create_drivers_dir(struct module_kobject *mk) in module_create_drivers_dir() argument
30 if (mk && !mk->drivers_dir) in module_create_drivers_dir()
31 mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); in module_create_drivers_dir()
39 struct module_kobject *mk = NULL; in module_add_driver() local
45 mk = &mod->mkobj; in module_add_driver()
52 mk = container_of(mkobj, struct module_kobject, kobj); in module_add_driver()
54 drv->p->mkobj = mk; in module_add_driver()
60 if (!mk) in module_add_driver()
64 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); in module_add_driver()
67 module_create_drivers_dir(mk); in module_add_driver()
68 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, in module_add_driver()
76 struct module_kobject *mk = NULL; in module_remove_driver() local
85 mk = &drv->owner->mkobj; in module_remove_driver()
87 mk = drv->p->mkobj; in module_remove_driver()
88 if (mk && mk->drivers_dir) { in module_remove_driver()
91 sysfs_remove_link(mk->drivers_dir, driver_name); in module_remove_driver()