diff options
author | Steven Toth | 2010-09-05 11:24:50 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab | 2010-10-21 07:55:20 -0200 |
commit | 22760ed39c2383e7711753e7582dac5d6d5f647c (patch) | |
tree | a57c709890bc4ba916642cc1ed20078145c5134f /drivers | |
parent | a1c592b766ee94aaf0e2549b8ba4d0298c328484 (diff) |
[media] saa7164: bugfix, avoid oops when driver unloads without firmware
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/saa7164/saa7164-core.c | 3 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164-fw.c | 1 | ||||
-rw-r--r-- | drivers/media/video/saa7164/saa7164.h | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c index 222fbda0cb78..99819ac65cc9 100644 --- a/drivers/media/video/saa7164/saa7164-core.c +++ b/drivers/media/video/saa7164/saa7164-core.c @@ -1423,7 +1423,8 @@ static void __devexit saa7164_finidev(struct pci_dev *pci_dev) kthread_stop(dev->kthread); dev->kthread = NULL; } - saa7164_api_set_debug(dev, 0x00); + if (dev->firmwareloaded) + saa7164_api_set_debug(dev, 0x00); } saa7164_histogram_print(&dev->ports[ SAA7164_PORT_ENC1 ], diff --git a/drivers/media/video/saa7164/saa7164-fw.c b/drivers/media/video/saa7164/saa7164-fw.c index e48e2b4878fc..484533c32bb1 100644 --- a/drivers/media/video/saa7164/saa7164-fw.c +++ b/drivers/media/video/saa7164/saa7164-fw.c @@ -604,6 +604,7 @@ int saa7164_downloadfirmware(struct saa7164_dev *dev) } } + dev->firmwareloaded = 1; ret = 0; out: diff --git a/drivers/media/video/saa7164/saa7164.h b/drivers/media/video/saa7164/saa7164.h index f16b3f961199..5ff79ab04405 100644 --- a/drivers/media/video/saa7164/saa7164.h +++ b/drivers/media/video/saa7164/saa7164.h @@ -452,6 +452,7 @@ struct saa7164_dev { /* firmware status */ struct saa7164_fw_status fw_status; + u32 firmwareloaded; tmComResHWDescr_t hwdesc; tmComResInterfaceDescr_t intfdesc; |