V4L/DVB (6667): Fix access to configuration space while in D3
pci_save_state should be called before pci_set_power_state and pci_restore_state after pci_set_power_state Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
91821ff3f9
commit
0d65cd4f2b
@@ -1194,8 +1194,8 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state)
|
|||||||
if (dev->remote)
|
if (dev->remote)
|
||||||
saa7134_ir_stop(dev);
|
saa7134_ir_stop(dev);
|
||||||
|
|
||||||
pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
|
|
||||||
pci_save_state(pci_dev);
|
pci_save_state(pci_dev);
|
||||||
|
pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state));
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -1205,8 +1205,8 @@ static int saa7134_resume(struct pci_dev *pci_dev)
|
|||||||
struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
|
struct saa7134_dev *dev = pci_get_drvdata(pci_dev);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
|
||||||
pci_restore_state(pci_dev);
|
|
||||||
pci_set_power_state(pci_dev, PCI_D0);
|
pci_set_power_state(pci_dev, PCI_D0);
|
||||||
|
pci_restore_state(pci_dev);
|
||||||
|
|
||||||
/* Do things that are done in saa7134_initdev ,
|
/* Do things that are done in saa7134_initdev ,
|
||||||
except of initializing memory structures.*/
|
except of initializing memory structures.*/
|
||||||
|
Reference in New Issue
Block a user