diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-23 09:13:15 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:06:48 -0400 |
commit | fd8b281a2809d2bd9119df1fbd717ab2371297cd (patch) | |
tree | c5ebdbc3ba9febddded3d4cddd4deb0e75b9c027 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | 33c0fcad2160bc211272295e862c6f708118d006 (diff) |
V4L/DVB (6093): ivtv: reorganized and cleanup ivtv struct
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-driver.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c index 6a74e509c87d..855697c1c968 100644 --- a/drivers/media/video/ivtv/ivtv-driver.c +++ b/drivers/media/video/ivtv/ivtv-driver.c | |||
@@ -667,7 +667,7 @@ static int __devinit ivtv_init_struct1(struct ivtv *itv) | |||
667 | cx2341x_fill_defaults(&itv->params); | 667 | cx2341x_fill_defaults(&itv->params); |
668 | itv->params.port = CX2341X_PORT_MEMORY; | 668 | itv->params.port = CX2341X_PORT_MEMORY; |
669 | itv->params.capabilities = CX2341X_CAP_HAS_SLICED_VBI; | 669 | itv->params.capabilities = CX2341X_CAP_HAS_SLICED_VBI; |
670 | init_waitqueue_head(&itv->cap_w); | 670 | init_waitqueue_head(&itv->eos_waitq); |
671 | init_waitqueue_head(&itv->event_waitq); | 671 | init_waitqueue_head(&itv->event_waitq); |
672 | init_waitqueue_head(&itv->vsync_waitq); | 672 | init_waitqueue_head(&itv->vsync_waitq); |
673 | init_waitqueue_head(&itv->dma_waitq); | 673 | init_waitqueue_head(&itv->dma_waitq); |
@@ -713,14 +713,6 @@ static void __devinit ivtv_init_struct2(struct ivtv *itv) | |||
713 | break; | 713 | break; |
714 | itv->nof_audio_inputs = i; | 714 | itv->nof_audio_inputs = i; |
715 | 715 | ||
716 | /* 0x00EF = saa7114(239) 0x00F0 = saa7115(240) 0x0106 = micro */ | ||
717 | if (itv->card->hw_all & (IVTV_HW_SAA7115 | IVTV_HW_SAA717X)) | ||
718 | itv->digitizer = 0xF1; | ||
719 | else if (itv->card->hw_all & IVTV_HW_SAA7114) | ||
720 | itv->digitizer = 0xEF; | ||
721 | else /* cx25840 */ | ||
722 | itv->digitizer = 0x140; | ||
723 | |||
724 | if (itv->card->hw_all & IVTV_HW_CX25840) { | 716 | if (itv->card->hw_all & IVTV_HW_CX25840) { |
725 | itv->vbi.sliced_size = 288; /* multiple of 16, real size = 284 */ | 717 | itv->vbi.sliced_size = 288; /* multiple of 16, real size = 284 */ |
726 | } else { | 718 | } else { |
@@ -749,6 +741,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, | |||
749 | const struct pci_device_id *pci_id) | 741 | const struct pci_device_id *pci_id) |
750 | { | 742 | { |
751 | u16 cmd; | 743 | u16 cmd; |
744 | u8 card_rev; | ||
752 | unsigned char pci_latency; | 745 | unsigned char pci_latency; |
753 | 746 | ||
754 | IVTV_DEBUG_INFO("Enabling pci device\n"); | 747 | IVTV_DEBUG_INFO("Enabling pci device\n"); |
@@ -795,7 +788,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, | |||
795 | } | 788 | } |
796 | IVTV_DEBUG_INFO("Bus Mastering Enabled.\n"); | 789 | IVTV_DEBUG_INFO("Bus Mastering Enabled.\n"); |
797 | 790 | ||
798 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &itv->card_rev); | 791 | pci_read_config_byte(dev, PCI_CLASS_REVISION, &card_rev); |
799 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, &pci_latency); | 792 | pci_read_config_byte(dev, PCI_LATENCY_TIMER, &pci_latency); |
800 | 793 | ||
801 | if (pci_latency < 64 && ivtv_pci_latency) { | 794 | if (pci_latency < 64 && ivtv_pci_latency) { |
@@ -812,7 +805,7 @@ static int ivtv_setup_pci(struct ivtv *itv, struct pci_dev *dev, | |||
812 | 805 | ||
813 | IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " | 806 | IVTV_DEBUG_INFO("%d (rev %d) at %02x:%02x.%x, " |
814 | "irq: %d, latency: %d, memory: 0x%lx\n", | 807 | "irq: %d, latency: %d, memory: 0x%lx\n", |
815 | itv->dev->device, itv->card_rev, dev->bus->number, | 808 | itv->dev->device, card_rev, dev->bus->number, |
816 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), | 809 | PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), |
817 | itv->dev->irq, pci_latency, (unsigned long)itv->base_addr); | 810 | itv->dev->irq, pci_latency, (unsigned long)itv->base_addr); |
818 | 811 | ||