hpsa_sas_node
static int hpsa_add_sas_device(struct hpsa_sas_node *hpsa_sas_node,
*hpsa_alloc_sas_port(struct hpsa_sas_node *hpsa_sas_node,
hpsa_sas_port->parent_node = hpsa_sas_node;
port = sas_port_alloc_num(hpsa_sas_node->parent_dev);
&hpsa_sas_node->port_list_head);
static struct hpsa_sas_node *hpsa_alloc_sas_node(struct device *parent_dev)
struct hpsa_sas_node *hpsa_sas_node;
hpsa_sas_node = kzalloc_obj(*hpsa_sas_node);
if (hpsa_sas_node) {
hpsa_sas_node->parent_dev = parent_dev;
INIT_LIST_HEAD(&hpsa_sas_node->port_list_head);
return hpsa_sas_node;
static void hpsa_free_sas_node(struct hpsa_sas_node *hpsa_sas_node)
if (!hpsa_sas_node)
&hpsa_sas_node->port_list_head, port_list_entry)
kfree(hpsa_sas_node);
struct hpsa_sas_node *hpsa_sas_node;
hpsa_sas_node = hpsa_alloc_sas_node(parent_dev);
if (!hpsa_sas_node)
hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, h->sas_address);
h->sas_host = hpsa_sas_node;
hpsa_free_sas_node(hpsa_sas_node);
static int hpsa_add_sas_device(struct hpsa_sas_node *hpsa_sas_node,
hpsa_sas_port = hpsa_alloc_sas_port(hpsa_sas_node, device->sas_address);
struct hpsa_sas_node *sas_host;
struct hpsa_sas_node *parent_node;