diff options
author | Tejun Heo <htejun@gmail.com> | 2007-03-02 03:32:47 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-02 18:30:35 -0500 |
commit | 6ffa01d88c9dd45e2ed917b5eeeb494d07efb1ab (patch) | |
tree | 3fe262ccaa1c0f8c5e5d187216d8bfc70db34d95 /drivers/ata/libata-core.c | |
parent | 438ac6d5e3f8106a6bd1a5682c508d660294a85d (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.c | 11 |
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 | ||
5357 | static int ata_host_request_pm(struct ata_host *host, pm_message_t mesg, | 5358 | static 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 | ||
6107 | void ata_pci_device_do_suspend(struct pci_dev *pdev, pm_message_t mesg) | 6110 | void 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); | |||
6363 | EXPORT_SYMBOL_GPL(sata_scr_write_flush); | 6368 | EXPORT_SYMBOL_GPL(sata_scr_write_flush); |
6364 | EXPORT_SYMBOL_GPL(ata_port_online); | 6369 | EXPORT_SYMBOL_GPL(ata_port_online); |
6365 | EXPORT_SYMBOL_GPL(ata_port_offline); | 6370 | EXPORT_SYMBOL_GPL(ata_port_offline); |
6371 | #ifdef CONFIG_PM | ||
6366 | EXPORT_SYMBOL_GPL(ata_host_suspend); | 6372 | EXPORT_SYMBOL_GPL(ata_host_suspend); |
6367 | EXPORT_SYMBOL_GPL(ata_host_resume); | 6373 | EXPORT_SYMBOL_GPL(ata_host_resume); |
6374 | #endif /* CONFIG_PM */ | ||
6368 | EXPORT_SYMBOL_GPL(ata_id_string); | 6375 | EXPORT_SYMBOL_GPL(ata_id_string); |
6369 | EXPORT_SYMBOL_GPL(ata_id_c_string); | 6376 | EXPORT_SYMBOL_GPL(ata_id_c_string); |
6370 | EXPORT_SYMBOL_GPL(ata_id_to_dma_mode); | 6377 | EXPORT_SYMBOL_GPL(ata_id_to_dma_mode); |
@@ -6380,16 +6387,20 @@ EXPORT_SYMBOL_GPL(pci_test_config_bits); | |||
6380 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); | 6387 | EXPORT_SYMBOL_GPL(ata_pci_init_native_mode); |
6381 | EXPORT_SYMBOL_GPL(ata_pci_init_one); | 6388 | EXPORT_SYMBOL_GPL(ata_pci_init_one); |
6382 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); | 6389 | EXPORT_SYMBOL_GPL(ata_pci_remove_one); |
6390 | #ifdef CONFIG_PM | ||
6383 | EXPORT_SYMBOL_GPL(ata_pci_device_do_suspend); | 6391 | EXPORT_SYMBOL_GPL(ata_pci_device_do_suspend); |
6384 | EXPORT_SYMBOL_GPL(ata_pci_device_do_resume); | 6392 | EXPORT_SYMBOL_GPL(ata_pci_device_do_resume); |
6385 | EXPORT_SYMBOL_GPL(ata_pci_device_suspend); | 6393 | EXPORT_SYMBOL_GPL(ata_pci_device_suspend); |
6386 | EXPORT_SYMBOL_GPL(ata_pci_device_resume); | 6394 | EXPORT_SYMBOL_GPL(ata_pci_device_resume); |
6395 | #endif /* CONFIG_PM */ | ||
6387 | EXPORT_SYMBOL_GPL(ata_pci_default_filter); | 6396 | EXPORT_SYMBOL_GPL(ata_pci_default_filter); |
6388 | EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); | 6397 | EXPORT_SYMBOL_GPL(ata_pci_clear_simplex); |
6389 | #endif /* CONFIG_PCI */ | 6398 | #endif /* CONFIG_PCI */ |
6390 | 6399 | ||
6400 | #ifdef CONFIG_PM | ||
6391 | EXPORT_SYMBOL_GPL(ata_scsi_device_suspend); | 6401 | EXPORT_SYMBOL_GPL(ata_scsi_device_suspend); |
6392 | EXPORT_SYMBOL_GPL(ata_scsi_device_resume); | 6402 | EXPORT_SYMBOL_GPL(ata_scsi_device_resume); |
6403 | #endif /* CONFIG_PM */ | ||
6393 | 6404 | ||
6394 | EXPORT_SYMBOL_GPL(ata_eng_timeout); | 6405 | EXPORT_SYMBOL_GPL(ata_eng_timeout); |
6395 | EXPORT_SYMBOL_GPL(ata_port_schedule_eh); | 6406 | EXPORT_SYMBOL_GPL(ata_port_schedule_eh); |