Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28230
b: refs/heads/master
c: c5943d3
h: refs/heads/master
v: v3
  • Loading branch information
James Bottomley authored and James Bottomley committed Jun 12, 2006
1 parent 2eabccf commit 2aa7060
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8d7feac3c7504425aaf61dc7d804685a6b89ee43
refs/heads/master: c5943d36aebb79589ac3983eec418bbeca897573
14 changes: 14 additions & 0 deletions trunk/drivers/scsi/scsi_transport_sas.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,6 +747,18 @@ static void sas_end_device_release(struct device *dev)
kfree(edev);
}

/**
* sas_rphy_initialize - common rphy intialization
* @rphy: rphy to initialise
*
* Used by both sas_end_device_alloc() and sas_expander_alloc() to
* initialise the common rphy component of each.
*/
static void sas_rphy_initialize(struct sas_rphy *rphy)
{
INIT_LIST_HEAD(&rphy->list);
}

/**
* sas_end_device_alloc - allocate an rphy for an end device
*
Expand All @@ -771,6 +783,7 @@ struct sas_rphy *sas_end_device_alloc(struct sas_phy *parent)
sprintf(rdev->rphy.dev.bus_id, "end_device-%d:%d-%d",
shost->host_no, parent->port_identifier, parent->number);
rdev->rphy.identify.device_type = SAS_END_DEVICE;
sas_rphy_initialize(&rdev->rphy);
transport_setup_device(&rdev->rphy.dev);

return &rdev->rphy;
Expand Down Expand Up @@ -809,6 +822,7 @@ struct sas_rphy *sas_expander_alloc(struct sas_phy *parent,
sprintf(rdev->rphy.dev.bus_id, "expander-%d:%d",
shost->host_no, rdev->rphy.scsi_target_id);
rdev->rphy.identify.device_type = type;
sas_rphy_initialize(&rdev->rphy);
transport_setup_device(&rdev->rphy.dev);

return &rdev->rphy;
Expand Down

0 comments on commit 2aa7060

Please sign in to comment.