isci: unify remote_device data structures

Make it explicit that isci_remote_device and scic_sds_remote_device are
one in the same object.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams
2011-04-21 18:14:45 -07:00
parent 9614395ea2
commit 57f20f4ed6
9 changed files with 28 additions and 75 deletions

View File

@@ -110,18 +110,9 @@ struct isci_host {
struct list_head requests_to_errorback;
spinlock_t scic_lock;
/* careful only access this via idev_by_id */
struct isci_remote_device devices[0];
struct isci_remote_device devices[SCI_MAX_REMOTE_DEVICES];
};
static inline struct isci_remote_device *idev_by_id(struct isci_host *ihost, int i)
{
void *p = ihost->devices;
return p + i * (sizeof(struct isci_remote_device) +
scic_remote_device_get_object_size());
}
/**
* struct isci_pci_info - This class represents the pci function containing the
* controllers. Depending on PCI SKU, there could be up to 2 controllers in