• Home
  • Raw
  • Download

Lines Matching refs:slot

22 void dealloc_slot_struct(struct slot *slot)  in dealloc_slot_struct()  argument
24 of_node_put(slot->dn); in dealloc_slot_struct()
25 kfree(slot->name); in dealloc_slot_struct()
26 kfree(slot); in dealloc_slot_struct()
29 struct slot *alloc_slot_struct(struct device_node *dn, in alloc_slot_struct()
32 struct slot *slot; in alloc_slot_struct() local
34 slot = kzalloc(sizeof(struct slot), GFP_KERNEL); in alloc_slot_struct()
35 if (!slot) in alloc_slot_struct()
37 slot->name = kstrdup(drc_name, GFP_KERNEL); in alloc_slot_struct()
38 if (!slot->name) in alloc_slot_struct()
40 slot->dn = of_node_get(dn); in alloc_slot_struct()
41 slot->index = drc_index; in alloc_slot_struct()
42 slot->power_domain = power_domain; in alloc_slot_struct()
43 slot->hotplug_slot.ops = &rpaphp_hotplug_slot_ops; in alloc_slot_struct()
45 return (slot); in alloc_slot_struct()
48 kfree(slot); in alloc_slot_struct()
53 static int is_registered(struct slot *slot) in is_registered() argument
55 struct slot *tmp_slot; in is_registered()
58 if (!strcmp(tmp_slot->name, slot->name)) in is_registered()
64 int rpaphp_deregister_slot(struct slot *slot) in rpaphp_deregister_slot() argument
67 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_deregister_slot()
70 __func__, slot->name); in rpaphp_deregister_slot()
72 list_del(&slot->rpaphp_slot_list); in rpaphp_deregister_slot()
74 dealloc_slot_struct(slot); in rpaphp_deregister_slot()
81 int rpaphp_register_slot(struct slot *slot) in rpaphp_register_slot() argument
83 struct hotplug_slot *php_slot = &slot->hotplug_slot; in rpaphp_register_slot()
90 __func__, slot->dn, slot->index, slot->name, in rpaphp_register_slot()
91 slot->power_domain, slot->type); in rpaphp_register_slot()
94 if (is_registered(slot)) { in rpaphp_register_slot()
95 err("rpaphp_register_slot: slot[%s] is already registered\n", slot->name); in rpaphp_register_slot()
99 for_each_child_of_node(slot->dn, child) { in rpaphp_register_slot()
101 if (my_index == slot->index) { in rpaphp_register_slot()
108 retval = pci_hp_register(php_slot, slot->bus, slotno, slot->name); in rpaphp_register_slot()
115 list_add(&slot->rpaphp_slot_list, &rpaphp_slot_head); in rpaphp_register_slot()
116 info("Slot [%s] registered\n", slot->name); in rpaphp_register_slot()