Lines Matching refs:kdrv
599 struct cpuidle_driver_kobj *kdrv; in cpuidle_add_driver_sysfs() local
604 kdrv = kzalloc(sizeof(*kdrv), GFP_KERNEL); in cpuidle_add_driver_sysfs()
605 if (!kdrv) in cpuidle_add_driver_sysfs()
608 kdrv->drv = drv; in cpuidle_add_driver_sysfs()
609 init_completion(&kdrv->kobj_unregister); in cpuidle_add_driver_sysfs()
611 ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle, in cpuidle_add_driver_sysfs()
614 kfree(kdrv); in cpuidle_add_driver_sysfs()
618 kobject_uevent(&kdrv->kobj, KOBJ_ADD); in cpuidle_add_driver_sysfs()
619 dev->kobj_driver = kdrv; in cpuidle_add_driver_sysfs()
630 struct cpuidle_driver_kobj *kdrv = dev->kobj_driver; in cpuidle_remove_driver_sysfs() local
631 kobject_put(&kdrv->kobj); in cpuidle_remove_driver_sysfs()
632 wait_for_completion(&kdrv->kobj_unregister); in cpuidle_remove_driver_sysfs()
633 kfree(kdrv); in cpuidle_remove_driver_sysfs()