aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@brturbo.com.br>2005-09-09 16:03:55 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-09-09 16:57:51 -0400
commit08adb9e20be83bb4c5322bf15b966c537038f6d9 (patch)
tree65d97de16e4bf83c451405ef2bce2f64ffe5e06f /drivers/media/video/cx88/cx88-video.c
parent4c93b07a48039cee1d845f38294abec0f803e05e (diff)
[PATCH] v4l: some error treatment implemented at resume functions.
- Some error treatment implemented at resume functions. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 61d4b29ec302..3dbc074fb515 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -2005,12 +2005,28 @@ static int cx8800_resume(struct pci_dev *pci_dev)
2005{ 2005{
2006 struct cx8800_dev *dev = pci_get_drvdata(pci_dev); 2006 struct cx8800_dev *dev = pci_get_drvdata(pci_dev);
2007 struct cx88_core *core = dev->core; 2007 struct cx88_core *core = dev->core;
2008 int err;
2008 2009
2009 if (dev->state.disabled) { 2010 if (dev->state.disabled) {
2010 pci_enable_device(pci_dev); 2011 err=pci_enable_device(pci_dev);
2012 if (err) {
2013 printk(KERN_ERR "%s: can't enable device\n",
2014 core->name);
2015 return err;
2016 }
2017
2011 dev->state.disabled = 0; 2018 dev->state.disabled = 0;
2012 } 2019 }
2013 pci_set_power_state(pci_dev, PCI_D0); 2020 err= pci_set_power_state(pci_dev, PCI_D0);
2021 if (err) {
2022 printk(KERN_ERR "%s: can't enable device\n",
2023 core->name);
2024
2025 pci_disable_device(pci_dev);
2026 dev->state.disabled = 1;
2027
2028 return err;
2029 }
2014 pci_restore_state(pci_dev); 2030 pci_restore_state(pci_dev);
2015 2031
2016 /* FIXME: re-initialize hardware */ 2032 /* FIXME: re-initialize hardware */