projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
ide
/
pci
/
sc1200.c
diff --git
a/drivers/ide/pci/sc1200.c
b/drivers/ide/pci/sc1200.c
index d2c8b5524f283df712581463e0c80a59b99fa0dc..0a7b3202066d99ee88c78902b4b4b03ee2904151 100644
(file)
--- a/
drivers/ide/pci/sc1200.c
+++ b/
drivers/ide/pci/sc1200.c
@@
-324,17
+324,18
@@
static int sc1200_suspend (struct pci_dev *dev, pm_message_t state)
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
pci_disable_device(dev);
pci_set_power_state(dev, pci_choose_state(dev, state));
- dev->current_state = state.event;
return 0;
}
static int sc1200_resume (struct pci_dev *dev)
{
ide_hwif_t *hwif = NULL;
return 0;
}
static int sc1200_resume (struct pci_dev *dev)
{
ide_hwif_t *hwif = NULL;
+ int i;
+
+ i = pci_enable_device(dev);
+ if (i)
+ return i;
- pci_set_power_state(dev, PCI_D0); // bring chip back from sleep state
- dev->current_state = PM_EVENT_ON;
- pci_enable_device(dev);
//
// loop over all interfaces that are part of this pci device:
//
//
// loop over all interfaces that are part of this pci device:
//