]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/scsi/hosts.c
PM: Allow SCSI devices to suspend/resume asynchronously
[net-next-2.6.git] / drivers / scsi / hosts.c
index 554626e1806256fb439d84ed681ee57d575180cc..09dbcb847b73c307ecb835e6463735f00ce9139c 100644 (file)
@@ -215,6 +215,8 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
                shost->shost_gendev.parent = dev ? dev : &platform_bus;
        shost->dma_dev = dma_dev;
 
+       device_enable_async_suspend(&shost->shost_gendev);
+
        error = device_add(&shost->shost_gendev);
        if (error)
                goto out;
@@ -222,6 +224,8 @@ int scsi_add_host_with_dma(struct Scsi_Host *shost, struct device *dev,
        scsi_host_set_state(shost, SHOST_RUNNING);
        get_device(shost->shost_gendev.parent);
 
+       device_enable_async_suspend(&shost->shost_dev);
+
        error = device_add(&shost->shost_dev);
        if (error)
                goto out_del_gendev;