aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata/libata-core.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-03-02 03:32:47 -0500
committerJeff Garzik <jeff@garzik.org>2007-03-02 18:30:35 -0500
commit6ffa01d88c9dd45e2ed917b5eeeb494d07efb1ab (patch)
tree3fe262ccaa1c0f8c5e5d187216d8bfc70db34d95 /drivers/ata/libata-core.c
parent438ac6d5e3f8106a6bd1a5682c508d660294a85d (diff)
libata: add CONFIG_PM to libata core layer
Conditionalize all PM related stuff in libata core layer using CONFIG_PM. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/ata/libata-core.c')
-rw-r--r--drivers/ata/libata-core.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c
index 606145eeba44..dc362fa01ca4 100644
--- a/drivers/ata/libata-core.c
+++ b/drivers/ata/libata-core.c
@@ -5354,6 +5354,7 @@ int ata_flush_cache(struct ata_device *dev)
5354 return 0; 5354 return 0;
5355} 5355}
5356 5356
5357#ifdef CONFIG_PM
5357static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, 5358static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg,
5358 unsigned int action, unsigned int ehi_flags, 5359 unsigned int action, unsigned int ehi_flags,
5359 int wait) 5360 int wait)
@@ -5469,6 +5470,7 @@ void ata_host_resume(struct ata_host *host)
5469 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0); 5470 ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET, 0);
5470 host->dev->power.power_state = PMSG_ON; 5471 host->dev->power.power_state = PMSG_ON;
5471} 5472}
5473#endif
5472 5474
5473/** 5475/**
5474 * ata_port_start - Set port up for dma. 5476 * ata_port_start - Set port up for dma.
@@ -6104,6 +6106,7 @@ int pci_test_config_bits(struct pci_dev *pdev, const struct pci_bits *bits)
6104 return (tmp == bits->val) ? 1 : 0; 6106 return (tmp == bits->val) ? 1 : 0;
6105} 6107}
6106 6108
6109#ifdef CONFIG_PM
6107void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg) 6110void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg)
6108{ 6111{
6109 pci_save_state(pdev); 6112 pci_save_state(pdev);
@@ -6155,6 +6158,8 @@ int ata_pci_device_resume(struct pci_dev *pdev)
6155 ata_host_resume(host); 6158 ata_host_resume(host);
6156 return rc; 6159 return rc;
6157} 6160}
6161#endif /* CONFIG_PM */
6162
6158#endif /* CONFIG_PCI */ 6163#endif /* CONFIG_PCI */
6159 6164
6160 6165
@@ -6363,8 +6368,10 @@ EXPORT_SYMBOL_GPL(sata_scr_write);
6363EXPORT_SYMBOL_GPL(sata_scr_write_flush); 6368EXPORT_SYMBOL_GPL(sata_scr_write_flush);
6364EXPORT_SYMBOL_GPL(ata_port_online); 6369EXPORT_SYMBOL_GPL(ata_port_online);
6365EXPORT_SYMBOL_GPL(ata_port_offline); 6370EXPORT_SYMBOL_GPL(ata_port_offline);
6371#ifdef CONFIG_PM
6366EXPORT_SYMBOL_GPL(ata_host_suspend); 6372EXPORT_SYMBOL_GPL(ata_host_suspend);
6367EXPORT_SYMBOL_GPL(ata_host_resume); 6373EXPORT_SYMBOL_GPL(ata_host_resume);
6374#endif /* CONFIG_PM */
6368EXPORT_SYMBOL_GPL(ata_id_string); 6375EXPORT_SYMBOL_GPL(ata_id_string);
6369EXPORT_SYMBOL_GPL(ata_id_c_string); 6376EXPORT_SYMBOL_GPL(ata_id_c_string);
6370EXPORT_SYMBOL_GPL(ata_id_to_dma_mode); 6377EXPORT_SYMBOL_GPL(ata_id_to_dma_mode);
@@ -6380,16 +6387,20 @@ EXPORT_SYMBOL_GPL(pci_test_config_bits);
6380EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); 6387EXPORT_SYMBOL_GPL(ata_pci_init_native_mode);
6381EXPORT_SYMBOL_GPL(ata_pci_init_one); 6388EXPORT_SYMBOL_GPL(ata_pci_init_one);
6382EXPORT_SYMBOL_GPL(ata_pci_remove_one); 6389EXPORT_SYMBOL_GPL(ata_pci_remove_one);
6390#ifdef CONFIG_PM
6383EXPORT_SYMBOL_GPL(ata_pci_device_do_suspend); 6391EXPORT_SYMBOL_GPL(ata_pci_device_do_suspend);
6384EXPORT_SYMBOL_GPL(ata_pci_device_do_resume); 6392EXPORT_SYMBOL_GPL(ata_pci_device_do_resume);
6385EXPORT_SYMBOL_GPL(ata_pci_device_suspend); 6393EXPORT_SYMBOL_GPL(ata_pci_device_suspend);
6386EXPORT_SYMBOL_GPL(ata_pci_device_resume); 6394EXPORT_SYMBOL_GPL(ata_pci_device_resume);
6395#endif /* CONFIG_PM */
6387EXPORT_SYMBOL_GPL(ata_pci_default_filter); 6396EXPORT_SYMBOL_GPL(ata_pci_default_filter);
6388EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); 6397EXPORT_SYMBOL_GPL(ata_pci_clear_simplex);
6389#endif /* CONFIG_PCI */ 6398#endif /* CONFIG_PCI */
6390 6399
6400#ifdef CONFIG_PM
6391EXPORT_SYMBOL_GPL(ata_scsi_device_suspend); 6401EXPORT_SYMBOL_GPL(ata_scsi_device_suspend);
6392EXPORT_SYMBOL_GPL(ata_scsi_device_resume); 6402EXPORT_SYMBOL_GPL(ata_scsi_device_resume);
6403#endif /* CONFIG_PM */
6393 6404
6394EXPORT_SYMBOL_GPL(ata_eng_timeout); 6405EXPORT_SYMBOL_GPL(ata_eng_timeout);
6395EXPORT_SYMBOL_GPL(ata_port_schedule_eh); 6406EXPORT_SYMBOL_GPL(ata_port_schedule_eh);