[PATCH v2 3/3] scsi: allow scsi devices to use direct complete

From: Derek Basehore
Date: Wed Feb 24 2016 - 19:22:54 EST


This allows scsi devices to remain runtime suspended for system
suspend. Since runtime suspend is stricter than system suspend
callbacks, this is just returning a positive number for the prepare
callback.

Signed-off-by: Derek Basehore <dbasehore@xxxxxxxxxxxx>
Reviewed-by: Eric Caruso <ejcaruso@xxxxxxxxxxxx>
---
drivers/scsi/scsi_pm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/scsi_pm.c b/drivers/scsi/scsi_pm.c
index b44c1bb..7af76ad 100644
--- a/drivers/scsi/scsi_pm.c
+++ b/drivers/scsi/scsi_pm.c
@@ -178,7 +178,7 @@ static int scsi_bus_prepare(struct device *dev)
/* Wait until async scanning is finished */
scsi_complete_async_scans();
}
- return 0;
+ return 1;
}

static int scsi_bus_suspend(struct device *dev)
--
2.7.0.rc3.207.g0ac5344