rk: revert 20f3d0b+v3.0.66 to v3.0
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / scsi_pm.c
index 122a5a2020ad5f3d607611e96b370e5f90a226d6..d70e91ae60af199d8e64a027fa4382026e553f90 100644 (file)
@@ -6,7 +6,6 @@
  */
 
 #include <linux/pm_runtime.h>
-#include <linux/async.h>
 
 #include <scsi/scsi.h>
 #include <scsi/scsi_device.h>
@@ -69,19 +68,6 @@ static int scsi_bus_resume_common(struct device *dev)
        return err;
 }
 
-static int scsi_bus_prepare(struct device *dev)
-{
-       if (scsi_is_sdev_device(dev)) {
-               /* sd probing uses async_schedule.  Wait until it finishes. */
-               async_synchronize_full();
-
-       } else if (scsi_is_host_device(dev)) {
-               /* Wait until async scanning is finished */
-               scsi_complete_async_scans();
-       }
-       return 0;
-}
-
 static int scsi_bus_suspend(struct device *dev)
 {
        return scsi_bus_suspend_common(dev, PMSG_SUSPEND);
@@ -100,7 +86,6 @@ static int scsi_bus_poweroff(struct device *dev)
 #else /* CONFIG_PM_SLEEP */
 
 #define scsi_bus_resume_common         NULL
-#define scsi_bus_prepare               NULL
 #define scsi_bus_suspend               NULL
 #define scsi_bus_freeze                        NULL
 #define scsi_bus_poweroff              NULL
@@ -209,7 +194,6 @@ void scsi_autopm_put_host(struct Scsi_Host *shost)
 #endif /* CONFIG_PM_RUNTIME */
 
 const struct dev_pm_ops scsi_bus_pm_ops = {
-       .prepare =              scsi_bus_prepare,
        .suspend =              scsi_bus_suspend,
        .resume =               scsi_bus_resume_common,
        .freeze =               scsi_bus_freeze,