Lines Matching refs:kdev
183 struct cpuidle_device_kobj *kdev = in to_cpuidle_device() local
186 return kdev->dev; in to_cpuidle_device()
226 struct cpuidle_device_kobj *kdev = in cpuidle_sysfs_release() local
229 complete(&kdev->kobj_unregister); in cpuidle_sysfs_release()
400 struct cpuidle_device_kobj *kdev = device->kobj_dev; in cpuidle_add_state_sysfs() local
413 &kdev->kobj, "state%d", i); in cpuidle_add_state_sysfs()
532 struct cpuidle_device_kobj *kdev = dev->kobj_dev; in cpuidle_add_driver_sysfs() local
544 &kdev->kobj, "driver"); in cpuidle_add_driver_sysfs()
614 struct cpuidle_device_kobj *kdev; in cpuidle_add_sysfs() local
630 kdev = kzalloc(sizeof(*kdev), GFP_KERNEL); in cpuidle_add_sysfs()
631 if (!kdev) in cpuidle_add_sysfs()
633 kdev->dev = dev; in cpuidle_add_sysfs()
635 init_completion(&kdev->kobj_unregister); in cpuidle_add_sysfs()
637 error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj, in cpuidle_add_sysfs()
640 kobject_put(&kdev->kobj); in cpuidle_add_sysfs()
641 kfree(kdev); in cpuidle_add_sysfs()
645 dev->kobj_dev = kdev; in cpuidle_add_sysfs()
646 kobject_uevent(&kdev->kobj, KOBJ_ADD); in cpuidle_add_sysfs()
657 struct cpuidle_device_kobj *kdev = dev->kobj_dev; in cpuidle_remove_sysfs() local
659 kobject_put(&kdev->kobj); in cpuidle_remove_sysfs()
660 wait_for_completion(&kdev->kobj_unregister); in cpuidle_remove_sysfs()
661 kfree(kdev); in cpuidle_remove_sysfs()