aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-07-26 03:58:33 -0400
committerJeff Garzik <jeff@garzik.org>2006-07-29 04:04:55 -0400
commit3c5100c1c40cc5e27b4da4a736994c76d93392a0 (patch)
tree27060b36ff09d3423da9539fc1c796ec058aca29 /drivers/scsi
parentc1332875cbe0c148c7f200d4f9b36b64e34d9872 (diff)
[PATCH] libata: cosmetic changes to PM functions
Unify pm_message_t argument to the new-style @mesg. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/libata-core.c12
-rw-r--r--drivers/scsi/libata-scsi.c8
2 files changed, 10 insertions, 10 deletions
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c
index 386e5f21e191..66feebdb01c3 100644
--- a/drivers/scsi/libata-core.c
+++ b/drivers/scsi/libata-core.c
@@ -5767,11 +5767,11 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits)
5767 return (tmp == bits->val) ? 1 : 0; 5767 return (tmp == bits->val) ? 1 : 0;
5768} 5768}
5769 5769
5770void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state) 5770void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg)
5771{ 5771{
5772 pci_save_state(pdev); 5772 pci_save_state(pdev);
5773 5773
5774 if (state.event == PM_EVENT_SUSPEND) { 5774 if (mesg.event == PM_EVENT_SUSPEND) {
5775 pci_disable_device(pdev); 5775 pci_disable_device(pdev);
5776 pci_set_power_state(pdev, PCI_D3hot); 5776 pci_set_power_state(pdev, PCI_D3hot);
5777 } 5777 }
@@ -5785,24 +5785,24 @@ void ata_pci_device_do_resume(struct pci_dev *pdev)
5785 pci_set_master(pdev); 5785 pci_set_master(pdev);
5786} 5786}
5787 5787
5788int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state) 5788int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
5789{ 5789{
5790 struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev); 5790 struct ata_host_set *host_set = dev_get_drvdata(&pdev->dev);
5791 int rc = 0; 5791 int rc = 0;
5792 5792
5793 rc = ata_host_set_suspend(host_set, state); 5793 rc = ata_host_set_suspend(host_set, mesg);
5794 if (rc) 5794 if (rc)
5795 return rc; 5795 return rc;
5796 5796
5797 if (host_set->next) { 5797 if (host_set->next) {
5798 rc = ata_host_set_suspend(host_set->next, state); 5798 rc = ata_host_set_suspend(host_set->next, mesg);
5799 if (rc) { 5799 if (rc) {
5800 ata_host_set_resume(host_set); 5800 ata_host_set_resume(host_set);
5801 return rc; 5801 return rc;
5802 } 5802 }
5803 } 5803 }
5804 5804
5805 ata_pci_device_do_suspend(pdev, state); 5805 ata_pci_device_do_suspend(pdev, mesg);
5806 5806
5807 return 0; 5807 return 0;
5808} 5808}
diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c
index 7ced41ecde86..1638e57028cb 100644
--- a/drivers/scsi/libata-scsi.c
+++ b/drivers/scsi/libata-scsi.c
@@ -400,7 +400,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf)
400/** 400/**
401 * ata_scsi_device_suspend - suspend ATA device associated with sdev 401 * ata_scsi_device_suspend - suspend ATA device associated with sdev
402 * @sdev: the SCSI device to suspend 402 * @sdev: the SCSI device to suspend
403 * @state: target power management state 403 * @mesg: target power management message
404 * 404 *
405 * Request suspend EH action on the ATA device associated with 405 * Request suspend EH action on the ATA device associated with
406 * @sdev and wait for the operation to complete. 406 * @sdev and wait for the operation to complete.
@@ -411,7 +411,7 @@ void ata_dump_status(unsigned id, struct ata_taskfile *tf)
411 * RETURNS: 411 * RETURNS:
412 * 0 on success, -errno otherwise. 412 * 0 on success, -errno otherwise.
413 */ 413 */
414int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) 414int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t mesg)
415{ 415{
416 struct ata_port *ap = ata_shost_to_port(sdev->host); 416 struct ata_port *ap = ata_shost_to_port(sdev->host);
417 struct ata_device *dev = ata_scsi_find_dev(ap, sdev); 417 struct ata_device *dev = ata_scsi_find_dev(ap, sdev);
@@ -438,7 +438,7 @@ int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
438 438
439 /* request suspend */ 439 /* request suspend */
440 action = ATA_EH_SUSPEND; 440 action = ATA_EH_SUSPEND;
441 if (state.event != PM_EVENT_SUSPEND) 441 if (mesg.event != PM_EVENT_SUSPEND)
442 action |= ATA_EH_PM_FREEZE; 442 action |= ATA_EH_PM_FREEZE;
443 ap->eh_info.dev_action[dev->devno] |= action; 443 ap->eh_info.dev_action[dev->devno] |= action;
444 ap->eh_info.flags |= ATA_EHI_QUIET; 444 ap->eh_info.flags |= ATA_EHI_QUIET;
@@ -463,7 +463,7 @@ int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state)
463 spin_unlock_irqrestore(ap->lock, flags); 463 spin_unlock_irqrestore(ap->lock, flags);
464 out: 464 out:
465 if (rc == 0) 465 if (rc == 0)
466 sdev->sdev_gendev.power.power_state = state; 466 sdev->sdev_gendev.power.power_state = mesg;
467 return rc; 467 return rc;
468} 468}
469 469