diff options
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 0dd4e0529970..2b810bb2a4c7 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -670,7 +670,7 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
670 | cx18_init_power(cx, 1); | 670 | cx18_init_power(cx, 1); |
671 | cx18_init_memory(cx); | 671 | cx18_init_memory(cx); |
672 | 672 | ||
673 | cx->scb = (struct cx18_scb *)(cx->enc_mem + SCB_OFFSET); | 673 | cx->scb = (struct cx18_scb __iomem *)(cx->enc_mem + SCB_OFFSET); |
674 | cx18_init_scb(cx); | 674 | cx18_init_scb(cx); |
675 | 675 | ||
676 | cx18_gpio_init(cx); | 676 | cx18_gpio_init(cx); |
@@ -751,17 +751,6 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
751 | if (cx->options.radio > 0) | 751 | if (cx->options.radio > 0) |
752 | cx->v4l2_cap |= V4L2_CAP_RADIO; | 752 | cx->v4l2_cap |= V4L2_CAP_RADIO; |
753 | 753 | ||
754 | retval = cx18_streams_setup(cx); | ||
755 | if (retval) { | ||
756 | CX18_ERR("Error %d setting up streams\n", retval); | ||
757 | goto free_irq; | ||
758 | } | ||
759 | retval = cx18_streams_register(cx); | ||
760 | if (retval) { | ||
761 | CX18_ERR("Error %d registering devices\n", retval); | ||
762 | goto free_streams; | ||
763 | } | ||
764 | |||
765 | if (cx->options.tuner > -1) { | 754 | if (cx->options.tuner > -1) { |
766 | struct tuner_setup setup; | 755 | struct tuner_setup setup; |
767 | 756 | ||
@@ -788,7 +777,16 @@ static int __devinit cx18_probe(struct pci_dev *dev, | |||
788 | are not. */ | 777 | are not. */ |
789 | cx->tuner_std = cx->std; | 778 | cx->tuner_std = cx->std; |
790 | 779 | ||
791 | cx18_init_on_first_open(cx); | 780 | retval = cx18_streams_setup(cx); |
781 | if (retval) { | ||
782 | CX18_ERR("Error %d setting up streams\n", retval); | ||
783 | goto free_irq; | ||
784 | } | ||
785 | retval = cx18_streams_register(cx); | ||
786 | if (retval) { | ||
787 | CX18_ERR("Error %d registering devices\n", retval); | ||
788 | goto free_streams; | ||
789 | } | ||
792 | 790 | ||
793 | CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); | 791 | CX18_INFO("Initialized card #%d: %s\n", cx->num, cx->card_name); |
794 | 792 | ||
@@ -889,7 +887,7 @@ static void cx18_remove(struct pci_dev *pci_dev) | |||
889 | 887 | ||
890 | /* Stop all captures */ | 888 | /* Stop all captures */ |
891 | CX18_DEBUG_INFO("Stopping all streams\n"); | 889 | CX18_DEBUG_INFO("Stopping all streams\n"); |
892 | if (atomic_read(&cx->capturing) > 0) | 890 | if (atomic_read(&cx->tot_capturing) > 0) |
893 | cx18_stop_all_captures(cx); | 891 | cx18_stop_all_captures(cx); |
894 | 892 | ||
895 | /* Interrupts */ | 893 | /* Interrupts */ |