Lines Matching refs:kdev
154 struct cpuidle_device_kobj *kdev = in to_cpuidle_device() local
157 return kdev->dev; in to_cpuidle_device()
197 struct cpuidle_device_kobj *kdev = in cpuidle_sysfs_release() local
200 complete(&kdev->kobj_unregister); in cpuidle_sysfs_release()
472 struct cpuidle_device_kobj *kdev = device->kobj_dev; in cpuidle_add_state_sysfs() local
488 &kdev->kobj, "state%d", i); in cpuidle_add_state_sysfs()
608 struct cpuidle_device_kobj *kdev = dev->kobj_dev; in cpuidle_add_driver_sysfs() local
620 &kdev->kobj, "driver"); in cpuidle_add_driver_sysfs()
690 struct cpuidle_device_kobj *kdev; in cpuidle_add_sysfs() local
706 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); in cpuidle_add_sysfs()
707 if (!kdev) in cpuidle_add_sysfs()
709 kdev->dev = dev; in cpuidle_add_sysfs()
711 init_completion(&kdev->kobj_unregister); in cpuidle_add_sysfs()
713 error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj, in cpuidle_add_sysfs()
716 kobject_put(&kdev->kobj); in cpuidle_add_sysfs()
717 kfree(kdev); in cpuidle_add_sysfs()
721 dev->kobj_dev = kdev; in cpuidle_add_sysfs()
722 kobject_uevent(&kdev->kobj, KOBJ_ADD); in cpuidle_add_sysfs()
733 struct cpuidle_device_kobj *kdev = dev->kobj_dev; in cpuidle_remove_sysfs() local
735 kobject_put(&kdev->kobj); in cpuidle_remove_sysfs()
736 wait_for_completion(&kdev->kobj_unregister); in cpuidle_remove_sysfs()
737 kfree(kdev); in cpuidle_remove_sysfs()