aboutsummaryrefslogtreecommitdiffstats
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
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>
-rw-r--r--drivers/scsi/libata-core.c12
-rw-r--r--drivers/scsi/libata-scsi.c8
-rw-r--r--include/linux/libata.h6
3 files changed, 13 insertions, 13 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
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 66c3100c2b94..b9416708bba2 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -676,9 +676,9 @@ extern void ata_std_ports(struct ata_ioports *ioaddr);
676extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, 676extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info,
677 unsigned int n_ports); 677 unsigned int n_ports);
678extern void ata_pci_remove_one (struct pci_dev *pdev); 678extern void ata_pci_remove_one (struct pci_dev *pdev);
679extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t state); 679extern void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg);
680extern void ata_pci_device_do_resume(struct pci_dev *pdev); 680extern void ata_pci_device_do_resume(struct pci_dev *pdev);
681extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t state); 681extern int ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
682extern int ata_pci_device_resume(struct pci_dev *pdev); 682extern int ata_pci_device_resume(struct pci_dev *pdev);
683extern int ata_pci_clear_simplex(struct pci_dev *pdev); 683extern int ata_pci_clear_simplex(struct pci_dev *pdev);
684#endif /* CONFIG_PCI */ 684#endif /* CONFIG_PCI */
@@ -697,7 +697,7 @@ extern int sata_scr_write_flush(struct ata_port *ap, int reg, u32 val);
697extern int ata_port_online(struct ata_port *ap); 697extern int ata_port_online(struct ata_port *ap);
698extern int ata_port_offline(struct ata_port *ap); 698extern int ata_port_offline(struct ata_port *ap);
699extern int ata_scsi_device_resume(struct scsi_device *); 699extern int ata_scsi_device_resume(struct scsi_device *);
700extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t state); 700extern int ata_scsi_device_suspend(struct scsi_device *, pm_message_t mesg);
701extern int ata_host_set_suspend(struct ata_host_set *host_set, 701extern int ata_host_set_suspend(struct ata_host_set *host_set,
702 pm_message_t mesg); 702 pm_message_t mesg);
703extern void ata_host_set_resume(struct ata_host_set *host_set); 703extern void ata_host_set_resume(struct ata_host_set *host_set);