diff --git a/drivers/scsi/isci/remote_device.c b/drivers/scsi/isci/remote_device.c
index e684a05..0eb5c73 100644
--- a/drivers/scsi/isci/remote_device.c
+++ b/drivers/scsi/isci/remote_device.c
@@ -92,7 +92,7 @@
 	/* Remove all related references to this device and free
 	 * the cache object.
 	 */
-	scic_remote_device_destruct(isci_device->sci_device_handle);
+	scic_remote_device_destruct(to_sci_dev(isci_device));
 	isci_device->domain_dev->lldd_dev = NULL;
 	list_del(&isci_device->node);
 	kmem_cache_free(isci_kmem_cache, isci_device);
@@ -117,7 +117,7 @@
 
 	/* let the core do it's common constuction. */
 	scic_remote_device_construct(port->sci_port_handle,
-				     isci_device->sci_device_handle);
+				     to_sci_dev(isci_device));
 
 	/* let the core do it's device specific constuction. */
 	if (isci_device->domain_dev->parent &&
@@ -183,15 +183,11 @@
 			"%s: parent->dev_type = EDGE_DEV\n",
 			__func__);
 
-		status = scic_remote_device_ea_construct(
-			isci_device->sci_device_handle,
-			(struct smp_response_discover *)&discover_response
-			);
+		status = scic_remote_device_ea_construct(to_sci_dev(isci_device),
+				(struct smp_response_discover *)&discover_response);
 
 	} else
-		status = scic_remote_device_da_construct(
-			isci_device->sci_device_handle
-			);
+		status = scic_remote_device_da_construct(to_sci_dev(isci_device));
 
 
 	if (status != SCI_SUCCESS) {
@@ -204,18 +200,13 @@
 		return status;
 	}
 
-	sci_object_set_association(
-		isci_device->sci_device_handle,
-		isci_device
-		);
+	sci_object_set_association(to_sci_dev(isci_device), isci_device);
 
 	BUG_ON(port->isci_host == NULL);
 
 	/* start the device. */
-	status = scic_remote_device_start(
-		isci_device->sci_device_handle,
-		ISCI_REMOTE_DEVICE_START_TIMEOUT
-		);
+	status = scic_remote_device_start(to_sci_dev(isci_device),
+					  ISCI_REMOTE_DEVICE_START_TIMEOUT);
 
 	if (status != SCI_SUCCESS) {
 		dev_warn(&port->isci_host->pdev->dev,
@@ -266,7 +257,6 @@
 isci_remote_device_alloc(struct isci_host *isci_host, struct isci_port *port)
 {
 	struct isci_remote_device *isci_device;
-	struct scic_sds_remote_device *sci_dev;
 
 	isci_device = kmem_cache_zalloc(isci_kmem_cache, GFP_KERNEL);
 
@@ -275,8 +265,6 @@
 		return NULL;
 	}
 
-	sci_dev = (struct scic_sds_remote_device *) &isci_device[1];
-	isci_device->sci_device_handle = sci_dev;
 	INIT_LIST_HEAD(&isci_device->reqs_in_process);
 	INIT_LIST_HEAD(&isci_device->node);
 	isci_device->host_quiesce          = false;
@@ -441,10 +429,7 @@
 
 	spin_lock_irqsave(&isci_device->isci_port->isci_host->scic_lock, flags);
 
-	status = scic_remote_device_stop(
-		isci_device->sci_device_handle,
-		50
-		);
+	status = scic_remote_device_stop(to_sci_dev(isci_device), 50);
 
 	spin_unlock_irqrestore(&isci_device->isci_port->isci_host->scic_lock, flags);
 
diff --git a/drivers/scsi/isci/remote_device.h b/drivers/scsi/isci/remote_device.h
index 48e37cf..cd43c15 100644
--- a/drivers/scsi/isci/remote_device.h
+++ b/drivers/scsi/isci/remote_device.h
@@ -60,7 +60,6 @@
 struct scic_sds_remote_device;
 
 struct isci_remote_device {
-	struct scic_sds_remote_device *sci_device_handle;
 	enum isci_status status;
 	struct isci_port *isci_port;
 	struct domain_device *domain_dev;
@@ -73,6 +72,12 @@
 	bool host_quiesce;
 };
 
+static inline struct scic_sds_remote_device *to_sci_dev(struct isci_remote_device *idev)
+{
+	/* core data is an opaque buffer at the end of the idev */
+	return (struct scic_sds_remote_device *) &idev[1];
+}
+
 #define to_isci_remote_device(p)	\
 	container_of(p, struct isci_remote_device, sci_remote_device);
 
diff --git a/drivers/scsi/isci/request.c b/drivers/scsi/isci/request.c
index 81a7733..6b0863e 100644
--- a/drivers/scsi/isci/request.c
+++ b/drivers/scsi/isci/request.c
@@ -179,8 +179,7 @@
 	struct smp_discover_response_protocols dev_protocols;
 	enum sci_status status = SCI_SUCCESS;
 	struct sas_task *task = isci_request_access_task(request);
-	struct scic_sds_remote_device *sci_device =
-		isci_device->sci_device_handle;
+	struct scic_sds_remote_device *sci_device = to_sci_dev(isci_device);
 
 	dev_dbg(&isci_host->pdev->dev,
 		"%s: isci_device = 0x%p; request = %p, "
@@ -408,7 +407,7 @@
 	unsigned long flags;
 
 	isci_device = isci_dev_from_domain_dev(task->dev);
-	sci_device = isci_device->sci_device_handle;
+	sci_device = to_sci_dev(isci_device);
 
 	/* do common allocation and init of request object. */
 	ret = isci_request_alloc_io(
@@ -1177,7 +1176,7 @@
 	/* complete the io request to the core. */
 	scic_controller_complete_io(
 		isci_host->core_controller,
-		isci_device->sci_device_handle,
+		to_sci_dev(isci_device),
 		request->sci_request_handle
 		);
 	/* NULL the request handle so it cannot be completed or
diff --git a/drivers/scsi/isci/sata.c b/drivers/scsi/isci/sata.c
index 6fbf159..7a1b586 100644
--- a/drivers/scsi/isci/sata.c
+++ b/drivers/scsi/isci/sata.c
@@ -348,7 +348,7 @@
 	spin_lock_irqsave(&isci_host->scic_lock, flags);
 
 	/* Resume the device. */
-	scic_sds_remote_device_resume(isci_device->sci_device_handle);
+	scic_sds_remote_device_resume(to_sci_dev(isci_device));
 
 	spin_unlock_irqrestore(&isci_host->scic_lock, flags);
 
diff --git a/drivers/scsi/isci/task.c b/drivers/scsi/isci/task.c
index 232125e..c637bbc 100644
--- a/drivers/scsi/isci/task.c
+++ b/drivers/scsi/isci/task.c
@@ -285,7 +285,7 @@
 		"%s: isci_tmf = %p\n", __func__, isci_tmf);
 
 	isci_device = isci_tmf->device;
-	sci_device = isci_device->sci_device_handle;
+	sci_device = to_sci_dev(isci_device);
 
 	/* do common allocation and init of request object. */
 	status = isci_request_alloc_tmf(
@@ -395,7 +395,7 @@
 		/* Terminate the TMF transmit request. */
 		status = scic_controller_terminate_request(
 			request->isci_host->core_controller,
-			request->isci_device->sci_device_handle,
+			to_sci_dev(request->isci_device),
 			request->sci_request_handle
 			);
 
@@ -456,7 +456,7 @@
 			"%s: isci_device = %p\n",
 			__func__, isci_device);
 
-	sci_device = isci_device->sci_device_handle;
+	sci_device = to_sci_dev(isci_device);
 
 	/* Assign the pointer to the TMF's completion kernel wait structure. */
 	tmf->complete = &completion;
@@ -728,7 +728,7 @@
 		was_terminated = true;
 		status = scic_controller_terminate_request(
 			isci_host->core_controller,
-			isci_device->sci_device_handle,
+			to_sci_dev(isci_device),
 			isci_request->sci_request_handle
 			);
 	}
@@ -1469,7 +1469,7 @@
 
 	scic_controller_complete_task(
 		isci_host->core_controller,
-		isci_device->sci_device_handle,
+		to_sci_dev(isci_device),
 		request->sci_request_handle
 		);
 	/* NULL the request handle to make sure it cannot be terminated
@@ -1612,7 +1612,7 @@
 	if (isci_host != NULL)
 		spin_lock_irqsave(&isci_host->scic_lock, flags);
 
-	status = scic_remote_device_reset(isci_dev->sci_device_handle);
+	status = scic_remote_device_reset(to_sci_dev(isci_dev));
 	if (status != SCI_SUCCESS) {
 
 		if (isci_host != NULL)
@@ -1654,8 +1654,7 @@
 
 	if (isci_host != NULL)
 		spin_lock_irqsave(&isci_host->scic_lock, flags);
-	status
-		= scic_remote_device_reset_complete(isci_dev->sci_device_handle);
+	status = scic_remote_device_reset_complete(to_sci_dev(isci_dev));
 
 	if (isci_host != NULL)
 		spin_unlock_irqrestore(&isci_host->scic_lock, flags);
