Lines Matching full:drv
12 static char *make_driver_name(const struct device_driver *drv) in make_driver_name() argument
16 driver_name = kasprintf(GFP_KERNEL, "%s:%s", drv->bus->name, drv->name); in make_driver_name()
33 int module_add_driver(struct module *mod, const struct device_driver *drv) in module_add_driver() argument
39 if (!drv) in module_add_driver()
44 else if (drv->mod_name) { in module_add_driver()
48 mkobj = kset_find_obj(module_kset, drv->mod_name); in module_add_driver()
52 drv->p->mkobj = mk; in module_add_driver()
61 ret = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); in module_add_driver()
65 driver_name = make_driver_name(drv); in module_add_driver()
77 ret = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, driver_name); in module_add_driver()
92 sysfs_remove_link(&drv->p->kobj, "module"); in module_add_driver()
96 void module_remove_driver(const struct device_driver *drv) in module_remove_driver() argument
101 if (!drv) in module_remove_driver()
104 sysfs_remove_link(&drv->p->kobj, "module"); in module_remove_driver()
106 if (drv->owner) in module_remove_driver()
107 mk = &drv->owner->mkobj; in module_remove_driver()
108 else if (drv->p->mkobj) in module_remove_driver()
109 mk = drv->p->mkobj; in module_remove_driver()
111 driver_name = make_driver_name(drv); in module_remove_driver()