diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-04 22:59:28 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-11-04 22:59:28 +0200 |
commit | 8106c036a919ae34375e102150dceda249895549 (patch) | |
tree | bcc3c370c552535c729823db019ca2e2cd07dafa /linux/drivers/media/video/saa7134 | |
parent | ef4c26c70d9f69bb8a7ce769de5135983f8cf02b (diff) | |
download | mediapointer-dvb-s2-8106c036a919ae34375e102150dceda249895549.tar.gz mediapointer-dvb-s2-8106c036a919ae34375e102150dceda249895549.tar.bz2 |
Fix access to configuration space while in D3
From: Maxim Levitsky <maximlevitsky@gmail.com>
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 'linux/drivers/media/video/saa7134')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index b8b8977fe..c8398066f 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -1288,10 +1288,10 @@ static int saa7134_suspend(struct pci_dev *pci_dev , pm_message_t state) if (dev->remote) saa7134_ir_stop(dev); - pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); pci_save_state(pci_dev); + pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state)); - return 0; + return 0; } static int saa7134_resume(struct pci_dev *pci_dev) @@ -1300,8 +1300,8 @@ static int saa7134_resume(struct pci_dev *pci_dev) struct saa7134_dev *dev = pci_get_drvdata(pci_dev); unsigned int flags; - pci_restore_state(pci_dev); pci_set_power_state(pci_dev, PCI_D0); + pci_restore_state(pci_dev); /* Do things that are done in saa7134_initdev , except of initializing memory structures.*/ |