diff options
Diffstat (limited to 'drivers/ata/pata_hpt366.c')
-rw-r--r-- | drivers/ata/pata_hpt366.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index a742efa0da2b..a82089048f58 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
@@ -402,6 +402,11 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
402 | 402 | ||
403 | u32 class_rev; | 403 | u32 class_rev; |
404 | u32 reg1; | 404 | u32 reg1; |
405 | int rc; | ||
406 | |||
407 | rc = pcim_enable_device(dev); | ||
408 | if (rc) | ||
409 | return rc; | ||
405 | 410 | ||
406 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); | 411 | pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev); |
407 | class_rev &= 0xFF; | 412 | class_rev &= 0xFF; |
@@ -435,8 +440,15 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
435 | #ifdef CONFIG_PM | 440 | #ifdef CONFIG_PM |
436 | static int hpt36x_reinit_one(struct pci_dev *dev) | 441 | static int hpt36x_reinit_one(struct pci_dev *dev) |
437 | { | 442 | { |
443 | struct ata_host *host = dev_get_drvdata(&dev->dev); | ||
444 | int rc; | ||
445 | |||
446 | rc = ata_pci_device_do_resume(dev); | ||
447 | if (rc) | ||
448 | return rc; | ||
438 | hpt36x_init_chipset(dev); | 449 | hpt36x_init_chipset(dev); |
439 | return ata_pci_device_resume(dev); | 450 | ata_host_resume(host); |
451 | return 0; | ||
440 | } | 452 | } |
441 | #endif | 453 | #endif |
442 | 454 | ||