Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Feb 2010 01:22:53 +0000 (17:22 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 27 Feb 2010 01:22:53 +0000 (17:22 -0800)
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6:
  PM / Hibernate: Fix preallocating of memory
  PM / Hibernate: Remove swsusp.c finally
  PM / Hibernate: Remove trailing space in message
  PM: Allow SCSI devices to suspend/resume asynchronously
  PM: Allow USB devices to suspend/resume asynchronously
  USB: implement non-tree resume ordering constraints for PCI host controllers
  PM: Allow PCI devices to suspend/resume asynchronously
  PM / Hibernate: Swap, remove useless check from swsusp_read()
  PM / Hibernate: Really deprecate deprecated user ioctls
  PM: Allow device drivers to use dpm_wait()
  PM: Start asynchronous resume threads upfront
  PM: Add facility for advanced testing of async suspend/resume
  PM: Add a switch for disabling/enabling asynchronous suspend/resume
  PM: Asynchronous suspend and resume of devices
  PM: Add parent information to timing messages
  PM: Document device power attributes in sysfs
  PM / Runtime: Add sysfs switch for disabling device run-time PM

1  2 
drivers/scsi/scsi_sysfs.c

index a4936c4e2f46f89f0edbede325b0be7642129445,c5580805a3596fa0288d2d911e6a9efad8526696..19ec9e2d3f391c1189e57b178173bd446ed14b20
@@@ -847,6 -847,8 +847,8 @@@ static int scsi_target_add(struct scsi_
        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);
@@@ -878,8 -880,7 +880,8 @@@ int scsi_sysfs_add_sdev(struct scsi_dev
        struct request_queue *rq = sdev->request_queue;
        struct scsi_target *starget = sdev->sdev_target;
  
 -      if ((error = scsi_device_set_state(sdev, SDEV_RUNNING)) != 0)
 +      error = scsi_device_set_state(sdev, SDEV_RUNNING);
 +      if (error)
                return error;
  
        error = scsi_target_add(starget);
                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");
 -              goto out_remove;
 +              return error;
        }
+       device_enable_async_suspend(&sdev->sdev_dev);
        error = device_add(&sdev->sdev_dev);
        if (error) {
                printk(KERN_INFO "error 2\n");
                device_del(&sdev->sdev_gendev);
 -              goto out_remove;
 +              return error;
        }
        transport_add_device(&sdev->sdev_gendev);
        sdev->is_visible = 1;
        else
                error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_depth);
        if (error)
 -              goto out_remove;
 +              return error;
  
        if (sdev->host->hostt->change_queue_type)
                error = device_create_file(&sdev->sdev_gendev, &sdev_attr_queue_type_rw);
        else
                error = device_create_file(&sdev->sdev_gendev, &dev_attr_queue_type);
        if (error)
 -              goto out_remove;
 +              return error;
  
        error = bsg_register_queue(rq, &sdev->sdev_gendev, NULL, NULL);
  
                        error = device_create_file(&sdev->sdev_gendev,
                                        sdev->host->hostt->sdev_attrs[i]);
                        if (error)
 -                              goto out_remove;
 +                              return error;
                }
        }
  
 -      return 0;
 -
 - out_remove:
 -      __scsi_remove_device(sdev);
        return error;
 -
  }
  
  void __scsi_remove_device(struct scsi_device *sdev)