]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - drivers/scsi/scsi_sysfs.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[linux-2.6.git] / drivers / scsi / scsi_sysfs.c
index a4936c4e2f46f89f0edbede325b0be7642129445..19ec9e2d3f391c1189e57b178173bd446ed14b20 100644 (file)
@@ -847,6 +847,8 @@ static int scsi_target_add(struct scsi_target *starget)
        if (starget->state != STARGET_CREATED)
                return 0;
 
+       device_enable_async_suspend(&starget->dev);
+
        error = device_add(&starget->dev);
        if (error) {
                dev_err(&starget->dev, "target device_add failed, error %d\n", error);
@@ -887,11 +889,13 @@ int scsi_sysfs_add_sdev(struct scsi_device *sdev)
                return error;
 
        transport_configure_device(&starget->dev);
+       device_enable_async_suspend(&sdev->sdev_gendev);
        error = device_add(&sdev->sdev_gendev);
        if (error) {
                printk(KERN_INFO "error 1\n");
                return error;
        }
+       device_enable_async_suspend(&sdev->sdev_dev);
        error = device_add(&sdev->sdev_dev);
        if (error) {
                printk(KERN_INFO "error 2\n");