aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ata/pata_triflex.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c
index 03b6d69d6197..b3e0c9432283 100644
--- a/drivers/ata/pata_triflex.c
+++ b/drivers/ata/pata_triflex.c
@@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = {
210 { }, 210 { },
211}; 211};
212 212
213#ifdef CONFIG_PM
214static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
215{
216 struct ata_host *host = dev_get_drvdata(&pdev->dev);
217 int rc = 0;
218
219 rc = ata_host_suspend(host, mesg);
220 if (rc)
221 return rc;
222
223 /*
224 * We must not disable or powerdown the device.
225 * APM bios refuses to suspend if IDE is not accessible.
226 */
227 pci_save_state(pdev);
228
229 return 0;
230}
231
232#endif
233
213static struct pci_driver triflex_pci_driver = { 234static struct pci_driver triflex_pci_driver = {
214 .name = DRV_NAME, 235 .name = DRV_NAME,
215 .id_table = triflex, 236 .id_table = triflex,
216 .probe = triflex_init_one, 237 .probe = triflex_init_one,
217 .remove = ata_pci_remove_one, 238 .remove = ata_pci_remove_one,
218#ifdef CONFIG_PM 239#ifdef CONFIG_PM
219 .suspend = ata_pci_device_suspend, 240 .suspend = triflex_ata_pci_device_suspend,
220 .resume = ata_pci_device_resume, 241 .resume = ata_pci_device_resume,
221#endif 242#endif
222}; 243};