diff options
author | Edmund Nadolski <edmund.nadolski@intel.com> | 2011-05-05 05:11:43 +0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 15:04:46 +0400 |
commit | ed30c275dd9fc5c603081144db5df3110f258534 (patch) | |
tree | 1442debf4ea5bbb3a14a79c41f81848fb0be3a68 /drivers/scsi/isci/port.c | |
parent | 9286a1959ce7f3df3c1a8e33eb9b210078318dc8 (diff) | |
download | linux-ed30c275dd9fc5c603081144db5df3110f258534.tar.xz |
isci: kill scic_controller_get_port_handle function
This function is just overkill and its usage is inconsistent. Replace
with inlined code.
Signed-off-by: Edmund Nadolski <edmund.nadolski@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/scsi/isci/port.c')
-rw-r--r-- | drivers/scsi/isci/port.c | 37 |
1 files changed, 13 insertions, 24 deletions
diff --git a/drivers/scsi/isci/port.c b/drivers/scsi/isci/port.c index 8d96a10341b1..6110306e8e23 100644 --- a/drivers/scsi/isci/port.c +++ b/drivers/scsi/isci/port.c @@ -76,31 +76,20 @@ static void isci_port_change_state( -/** - * isci_port_init() - This function initializes the given isci_port object. - * @isci_port: This parameter specifies the port object to be initialized. - * @isci_host: This parameter specifies parent controller object for the port. - * @index: This parameter specifies which SCU port the isci_port associates - * with. Generally, SCU port 0 relates to isci_port 0, etc. - * - */ -void isci_port_init( - struct isci_port *isci_port, - struct isci_host *isci_host, - int index) +void isci_port_init(struct isci_port *iport, struct isci_host *ihost, int index) { - struct scic_sds_port *scic_port; - - INIT_LIST_HEAD(&isci_port->remote_dev_list); - INIT_LIST_HEAD(&isci_port->domain_dev_list); - spin_lock_init(&isci_port->state_lock); - init_completion(&isci_port->start_complete); - isci_port->isci_host = isci_host; - isci_port_change_state(isci_port, isci_freed); - - (void)scic_controller_get_port_handle(&isci_host->sci, index, &scic_port); - isci_port->sci_port_handle = scic_port; - scic_port->iport = isci_port; + struct scic_sds_port *sci_port; + + INIT_LIST_HEAD(&iport->remote_dev_list); + INIT_LIST_HEAD(&iport->domain_dev_list); + spin_lock_init(&iport->state_lock); + init_completion(&iport->start_complete); + iport->isci_host = ihost; + isci_port_change_state(iport, isci_freed); + + sci_port = &ihost->sci.port_table[index]; + iport->sci_port_handle = sci_port; + sci_port->iport = iport; } |