Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 247756
b: refs/heads/master
c: bfeec8c
h: refs/heads/master
v: v3
  • Loading branch information
Mikulas Patocka authored and Jeff Garzik committed May 20, 2011
1 parent 937a47c commit ef1eb66
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5f4e206666f834340b69ddb43f86de3851c8675a
refs/heads/master: bfeec8ca15c9c06c1978a25248e2bd11c4a26d72
23 changes: 22 additions & 1 deletion trunk/drivers/ata/pata_triflex.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,13 +210,34 @@ static const struct pci_device_id triflex[] = {
{ },
};

#ifdef CONFIG_PM
static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
int rc = 0;

rc = ata_host_suspend(host, mesg);
if (rc)
return rc;

/*
* We must not disable or powerdown the device.
* APM bios refuses to suspend if IDE is not accessible.
*/
pci_save_state(pdev);

return 0;
}

#endif

static struct pci_driver triflex_pci_driver = {
.name = DRV_NAME,
.id_table = triflex,
.probe = triflex_init_one,
.remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend,
.suspend = triflex_ata_pci_device_suspend,
.resume = ata_pci_device_resume,
#endif
};
Expand Down

0 comments on commit ef1eb66

Please sign in to comment.