diff options
author | Steven Toth <stoth@kernellabs.com> | 2010-09-05 10:24:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-10-21 05:55:20 -0400 |
commit | 22760ed39c2383e7711753e7582dac5d6d5f647c (patch) | |
tree | a57c709890bc4ba916642cc1ed20078145c5134f /drivers/media/video/saa7164 | |
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/media/video/saa7164')
-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) | |||
1423 | kthread_stop(dev->kthread); | 1423 | kthread_stop(dev->kthread); |
1424 | dev->kthread = NULL; | 1424 | dev->kthread = NULL; |
1425 | } | 1425 | } |
1426 | saa7164_api_set_debug(dev, 0x00); | 1426 | if (dev->firmwareloaded) |
1427 | saa7164_api_set_debug(dev, 0x00); | ||
1427 | } | 1428 | } |
1428 | 1429 | ||
1429 | saa7164_histogram_print(&dev->ports[ SAA7164_PORT_ENC1 ], | 1430 | 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) | |||
604 | } | 604 | } |
605 | } | 605 | } |
606 | 606 | ||
607 | dev->firmwareloaded = 1; | ||
607 | ret = 0; | 608 | ret = 0; |
608 | 609 | ||
609 | out: | 610 | 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 { | |||
452 | 452 | ||
453 | /* firmware status */ | 453 | /* firmware status */ |
454 | struct saa7164_fw_status fw_status; | 454 | struct saa7164_fw_status fw_status; |
455 | u32 firmwareloaded; | ||
455 | 456 | ||
456 | tmComResHWDescr_t hwdesc; | 457 | tmComResHWDescr_t hwdesc; |
457 | tmComResInterfaceDescr_t intfdesc; | 458 | tmComResInterfaceDescr_t intfdesc; |