Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 178080
b: refs/heads/master
c: b2dec48
h: refs/heads/master
v: v3
  • Loading branch information
Saeed Bishara authored and Jeff Garzik committed Dec 17, 2009
1 parent 587488e commit 21de370
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1bfeff03f8a52eb896e5aad33d52e2451437bb0b
refs/heads/master: b2dec48ccaad004fc706352f82725d43369d9bd7
29 changes: 29 additions & 0 deletions trunk/drivers/ata/sata_mv.c
Original file line number Diff line number Diff line change
Expand Up @@ -4161,13 +4161,21 @@ static struct platform_driver mv_platform_driver = {
#ifdef CONFIG_PCI
static int mv_pci_init_one(struct pci_dev *pdev,
const struct pci_device_id *ent);
#ifdef CONFIG_PM
static int mv_pci_device_resume(struct pci_dev *pdev);
#endif


static struct pci_driver mv_pci_driver = {
.name = DRV_NAME,
.id_table = mv_pci_tbl,
.probe = mv_pci_init_one,
.remove = ata_pci_remove_one,
#ifdef CONFIG_PM
.suspend = ata_pci_device_suspend,
.resume = mv_pci_device_resume,
#endif

};

/* move to PCI layer or libata core? */
Expand Down Expand Up @@ -4324,6 +4332,27 @@ static int mv_pci_init_one(struct pci_dev *pdev,
return ata_host_activate(host, pdev->irq, mv_interrupt, IRQF_SHARED,
IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
}

#ifdef CONFIG_PM
static int mv_pci_device_resume(struct pci_dev *pdev)
{
struct ata_host *host = dev_get_drvdata(&pdev->dev);
int rc;

rc = ata_pci_device_do_resume(pdev);
if (rc)
return rc;

/* initialize adapter */
rc = mv_init_host(host);
if (rc)
return rc;

ata_host_resume(host);

return 0;
}
#endif
#endif

static int mv_platform_probe(struct platform_device *pdev);
Expand Down

0 comments on commit 21de370

Please sign in to comment.