Lines Matching refs:ip_hw_id
784 struct ip_hw_id { struct
905 #define to_ip_hw_id(x) container_of(to_kset(x), struct ip_hw_id, hw_id_kset)
909 struct ip_hw_id *ip_hw_id = to_ip_hw_id(kobj); in ip_hw_id_release() local
911 if (!list_empty(&ip_hw_id->hw_id_kset.list)) in ip_hw_id_release()
913 kfree(ip_hw_id); in ip_hw_id_release()
1065 struct ip_hw_id *ip_hw_id = NULL; in amdgpu_discovery_sysfs_ips() local
1084 if (!ip_hw_id) { in amdgpu_discovery_sysfs_ips()
1085 ip_hw_id = kzalloc(sizeof(*ip_hw_id), GFP_KERNEL); in amdgpu_discovery_sysfs_ips()
1086 if (!ip_hw_id) in amdgpu_discovery_sysfs_ips()
1088 ip_hw_id->hw_id = ii; in amdgpu_discovery_sysfs_ips()
1090 kobject_set_name(&ip_hw_id->hw_id_kset.kobj, "%d", ii); in amdgpu_discovery_sysfs_ips()
1091 ip_hw_id->hw_id_kset.kobj.kset = &ip_die_entry->ip_kset; in amdgpu_discovery_sysfs_ips()
1092 ip_hw_id->hw_id_kset.kobj.ktype = &ip_hw_id_ktype; in amdgpu_discovery_sysfs_ips()
1093 res = kset_register(&ip_hw_id->hw_id_kset); in amdgpu_discovery_sysfs_ips()
1096 kfree(ip_hw_id); in amdgpu_discovery_sysfs_ips()
1101 &ip_hw_id->hw_id_kset.kobj, in amdgpu_discovery_sysfs_ips()
1141 ip_hw_instance->kobj.kset = &ip_hw_id->hw_id_kset; in amdgpu_discovery_sysfs_ips()
1257 static void amdgpu_discovery_sysfs_ip_hw_free(struct ip_hw_id *ip_hw_id) in amdgpu_discovery_sysfs_ip_hw_free() argument
1262 hw_id_kset = &ip_hw_id->hw_id_kset; in amdgpu_discovery_sysfs_ip_hw_free()
1272 kobject_put(&ip_hw_id->hw_id_kset.kobj); in amdgpu_discovery_sysfs_ip_hw_free()