diff options
author | Maxim Levitsky <maximlevitsky@gmail.com> | 2007-11-04 15:59:28 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-01-25 16:02:43 -0500 |
commit | 0d65cd4f2bfe70872e4218d9d35d37a7000d6739 (patch) | |
tree | a3a61f8c40abb299b3fb36d3799efc97aa435a26 /drivers | |
parent | 91821ff3f958c16bf84d02258dd79da792c66ca8 (diff) |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c index 76410f5bdcdd..40cdec26a7f4 100644 --- a/drivers/media/video/saa7134/saa7134-core.c +++ b/drivers/media/video/saa7134/saa7134-core.c | |||
@@ -1194,10 +1194,10 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) | |||
1194 | if (dev->remote) | 1194 | if (dev->remote) |
1195 | saa7134_ir_stop(dev); | 1195 | saa7134_ir_stop(dev); |
1196 | 1196 | ||
1197 | pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); | ||
1198 | pci_save_state(pci_dev); | 1197 | pci_save_state(pci_dev); |
1198 | pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); | ||
1199 | 1199 | ||
1200 | return 0; | 1200 | return 0; |
1201 | } | 1201 | } |
1202 | 1202 | ||
1203 | static int saa7134_resume(struct pci_dev *pci_dev) | 1203 | static int saa7134_resume(struct pci_dev *pci_dev) |
@@ -1205,8 +1205,8 @@ static int saa7134_resume(struct pci_dev *pci_dev) | |||
1205 | struct saa7134_dev *dev = pci_get_drvdata(pci_dev); | 1205 | struct saa7134_dev *dev = pci_get_drvdata(pci_dev); |
1206 | unsigned long flags; | 1206 | unsigned long flags; |
1207 | 1207 | ||
1208 | pci_restore_state(pci_dev); | ||
1209 | pci_set_power_state(pci_dev, PCI_D0); | 1208 | pci_set_power_state(pci_dev, PCI_D0); |
1209 | pci_restore_state(pci_dev); | ||
1210 | 1210 | ||
1211 | /* Do things that are done in saa7134_initdev , | 1211 | /* Do things that are done in saa7134_initdev , |
1212 | except of initializing memory structures.*/ | 1212 | except of initializing memory structures.*/ |