aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/device_handler/scsi_dh_hp_sw.c
diff options
context:
space:
mode:
authorChandra Seetharaman <sekharan@us.ibm.com>2009-10-21 09:22:46 -0700
committerJames Bottomley <James.Bottomley@suse.de>2009-12-04 12:00:46 -0600
commit3ae31f6a7b6e442fc6a92f29330fbad230dc3992 (patch)
tree9ca152ac3412de2917c0486b64898e6a75f853d9 /drivers/scsi/device_handler/scsi_dh_hp_sw.c
parent42e62a74377bcbb526565a31aa18da8f712b93ee (diff)
downloadkernel_samsung_smdk4412-3ae31f6a7b6e442fc6a92f29330fbad230dc3992.zip
kernel_samsung_smdk4412-3ae31f6a7b6e442fc6a92f29330fbad230dc3992.tar.gz
kernel_samsung_smdk4412-3ae31f6a7b6e442fc6a92f29330fbad230dc3992.tar.bz2
[SCSI] scsi_dh: Change the scsidh_activate interface to be asynchronous
Make scsi_dh_activate() function asynchronous, by taking in two additional parameters, one is the callback function and the other is the data to call the callback function with. Signed-off-by: Chandra Seetharaman <sekharan@us.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/device_handler/scsi_dh_hp_sw.c')
-rw-r--r--drivers/scsi/device_handler/scsi_dh_hp_sw.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/device_handler/scsi_dh_hp_sw.c b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
index f7da753..0aacafc 100644
--- a/drivers/scsi/device_handler/scsi_dh_hp_sw.c
+++ b/drivers/scsi/device_handler/scsi_dh_hp_sw.c
@@ -268,7 +268,8 @@ static int hp_sw_prep_fn(struct scsi_device *sdev, struct request *req)
* activate the passive path (and deactivate the
* previously active one).
*/
-static int hp_sw_activate(struct scsi_device *sdev)
+static int hp_sw_activate(struct scsi_device *sdev,
+ activate_complete fn, void *data)
{
int ret = SCSI_DH_OK;
struct hp_sw_dh_data *h = get_hp_sw_data(sdev);
@@ -283,7 +284,9 @@ static int hp_sw_activate(struct scsi_device *sdev)
HP_SW_NAME);
}
- return ret;
+ if (fn)
+ fn(data, ret);
+ return 0;
}
static const struct scsi_dh_devlist hp_sw_dh_data_list[] = {