Lines Matching refs:slot

23 void dealloc_slot_struct(struct slot *slot)  in dealloc_slot_struct()  argument
25 of_node_put(slot->dn); in dealloc_slot_struct()
26 kfree(slot->name); in dealloc_slot_struct()
27 kfree(slot); in dealloc_slot_struct()
30 struct slot *alloc_slot_struct(struct device_node *dn, in alloc_slot_struct()
33 struct slot *slot; in alloc_slot_struct() local
35 slot = kzalloc(sizeof(struct slot), GFP_KERNEL); in alloc_slot_struct()
36 if (!slot) in alloc_slot_struct()
38 slot->name = kstrdup(drc_name, GFP_KERNEL); in alloc_slot_struct()
39 if (!slot->name) in alloc_slot_struct()
41 slot->dn = of_node_get(dn); in alloc_slot_struct()
42 slot->index = drc_index; in alloc_slot_struct()
43 slot->power_domain = power_domain; in alloc_slot_struct()
44 slot->hotplug_slot.ops = &rpaphp_hotplug_slot_ops; in alloc_slot_struct()
46 return (slot); in alloc_slot_struct()
49 kfree(slot); in alloc_slot_struct()
54 static int is_registered(struct slot *slot) in is_registered() argument
56 struct slot *tmp_slot; in is_registered()
59 if (!strcmp(tmp_slot->name, slot->name)) in is_registered()
65 int rpaphp_deregister_slot(struct slot *slot) in rpaphp_deregister_slot() argument
68 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_deregister_slot()
71 __func__, slot->name); in rpaphp_deregister_slot()
73 list_del(&slot->rpaphp_slot_list); in rpaphp_deregister_slot()
75 dealloc_slot_struct(slot); in rpaphp_deregister_slot()
82 int rpaphp_register_slot(struct slot *slot) in rpaphp_register_slot() argument
84 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_register_slot()
91 __func__, slot->dn, slot->index, slot->name, in rpaphp_register_slot()
92 slot->power_domain, slot->type); in rpaphp_register_slot()
95 if (is_registered(slot)) { in rpaphp_register_slot()
96 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name); in rpaphp_register_slot()
100 for_each_child_of_node(slot->dn, child) { in rpaphp_register_slot()
102 if (my_index == slot->index) { in rpaphp_register_slot()
109 retval = pci_hp_register(php_slot, slot->bus, slotno, slot->name); in rpaphp_register_slot()
116 list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head); in rpaphp_register_slot()
117 info("Slot [%s] registered\n", slot->name); in rpaphp_register_slot()