diff options
author | Steven Toth <stoth@hauppauge.com> | 2008-01-10 09:43:18 -0500 |
---|---|---|
committer | Steven Toth <stoth@hauppauge.com> | 2008-01-10 09:43:18 -0500 |
commit | 66f3e98340a34bd0062a84e6b8e2aa84d29c42e3 (patch) | |
tree | 912b30c5708952d8bd9bb7336b4394b3af5ff36e /linux | |
parent | d675a695686fca466ff2bf1b1d19f27b1fcbe49e (diff) | |
download | mediapointer-dvb-s2-66f3e98340a34bd0062a84e6b8e2aa84d29c42e3.tar.gz mediapointer-dvb-s2-66f3e98340a34bd0062a84e6b8e2aa84d29c42e3.tar.bz2 |
cx23885: Cleanup of compiler defines and warnings
From: Steven Toth <stoth@hauppauge.com>
Portions of the code are if 0'd out but these are placeholders
for work already in progress, these will be activiated
very shortly.
Signed-off-by: Steven Toth <stoth@hauppauge.com>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/cx23885/cx23885-video.c | 79 |
1 files changed, 16 insertions, 63 deletions
diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index cc0b16d26..66a3528dc 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -320,16 +320,13 @@ void cx23885_video_wakeup(struct cx23885_dev *dev, break; buf = list_entry(q->active.next, struct cx23885_buffer, vb.queue); -#if 0 - if (buf->count > count) - break; -#else + /* count comes from the hw and is is 16bit wide -- * this trick handles wrap-arounds correctly for * up to 32767 buffers in flight... */ if ((s16) (count - buf->count) < 0) break; -#endif + do_gettimeofday(&buf->vb.ts); dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, count, buf->count); @@ -356,10 +353,6 @@ int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm) dev->tvnorm = norm; -#if 0 - set_tvaudio(core); -#endif - /* Tell the analog tuner/demods */ cx23885_call_i2c_clients(&dev->i2c_bus[1], VIDIOC_S_STD, &norm); @@ -520,6 +513,7 @@ static int cx23885_start_video_dma(struct cx23885_dev *dev, return 0; } +#if 0 #ifdef CONFIG_PM static int cx23885_stop_video_dma(struct cx23885_dev *dev) { @@ -534,6 +528,7 @@ static int cx23885_stop_video_dma(struct cx23885_dev *dev) return 0; } #endif +#endif static int cx23885_restart_video_queue(struct cx23885_dev *dev, struct cx23885_dmaqueue *q) @@ -960,11 +955,11 @@ static int video_release(struct inode *inode, struct file *file) file->private_data = NULL; kfree(fh); -#if 0 - /* FIXME: We are not putting the tuner to sleep here on exit, because + /* We are not putting the tuner to sleep here on exit, because * we want to use the mpeg encoder in another session to capture * tuner video. Closing this will result in no video to the encoder. */ +#if 0 cx23885_call_i2c_clients(&dev->i2c_bus[1], TUNER_SET_STANDBY, NULL); #endif @@ -1313,9 +1308,6 @@ static int vidioc_s_input(struct file *file, void *priv, unsigned int i) } mutex_lock(&dev->lock); -#if 0 - cx23885_newstation(dev); -#endif cx23885_video_mux(dev, i); mutex_unlock(&dev->lock); return 0; @@ -1442,14 +1434,11 @@ static int vidioc_g_register(struct file *file, void *fh, { struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; - cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_G_REGISTER, reg); - -#if 0 if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) return -EINVAL; - /* cx2388x has a 24-bit register space */ - reg->val = cx_read(reg->reg&0xffffff); -#endif + + cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_G_REGISTER, reg); + return 0; } @@ -1458,16 +1447,16 @@ static int vidioc_s_register(struct file *file, void *fh, { struct cx23885_dev *dev = ((struct cx23885_fh *)fh)->dev; - cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_S_REGISTER, reg); -#if 0 if (!v4l2_chip_match_host(reg->match_type, reg->match_chip)) return -EINVAL; - cx_write(reg->reg&0xffffff, reg->val); -#endif + + cx23885_call_i2c_clients(&dev->i2c_bus[2], VIDIOC_DBG_S_REGISTER, reg); + return 0; } #endif +#if 0 /* ----------------------------------------------------------- */ /* RADIO ESPECIFIC IOCTLS */ /* ----------------------------------------------------------- */ @@ -1565,7 +1554,7 @@ static int radio_queryctrl(struct file *file, void *priv, *c = no_ctl; return 0; } - +#endif /* ----------------------------------------------------------- */ static void cx23885_vid_timeout(unsigned long data) @@ -1653,41 +1642,6 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) return handled; } -#if 0 -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19) -static irqreturn_t cx8800_irq(int irq, void *dev_id, struct pt_regs *regs) -#else -static irqreturn_t cx8800_irq(int irq, void *dev_id) -#endif -{ - struct cx8800_dev *dev = dev_id; - struct cx88_core *core = dev->core; - u32 status; - int loop, handled = 0; - - for (loop = 0; loop < 10; loop++) { - status = cx_read(MO_PCI_INTSTAT) & (core->pci_irqmask | 0x01); - if (0 == status) - goto out; - cx_write(MO_PCI_INTSTAT, status); - handled = 1; - - if (status & core->pci_irqmask) - cx88_core_irq(core, status); - if (status & 0x01) - cx8800_vid_irq(dev); - }; - if (10 == loop) { - printk(KERN_WARNING "%s/0: irq loop -- clearing mask\n", - core->name); - cx_write(MO_PCI_INTMSK, 0); - } - - out: - return IRQ_RETVAL(handled); -} -#endif - /* ----------------------------------------------------------- */ /* exported stuff */ @@ -1762,7 +1716,6 @@ static const struct file_operations radio_fops = { static struct video_device cx23885_radio_template = { .name = "cx23885-radio", .type = VID_TYPE_TUNER, - .hardware = 0, .fops = &radio_fops, .minor = -1, .vidioc_querycap = radio_querycap, @@ -1837,6 +1790,7 @@ int cx23885_video_register(struct cx23885_dev *dev) cx23885_risc_stopper(dev->pci, &dev->vidq.stopper, VID_A_DMA_CTL, 0x11, 0x00); + /* Don't enable VBI yet */ #if 0 /* init vbi dma queues */ INIT_LIST_HEAD(&dev->vbiq.active); @@ -1850,6 +1804,7 @@ int cx23885_video_register(struct cx23885_dev *dev) cx_set(PCI_INT_MSK, 1); #if 0 + /* FIXME: These should be correctly defined */ /* load and configure helper modules */ if (TUNER_ABSENT != core->tuner_type) request_module("tuner"); @@ -1904,8 +1859,6 @@ int cx23885_video_register(struct cx23885_dev *dev) cx23885_video_mux(dev, 0); mutex_unlock(&dev->lock); - /* FIXME start tvaudio thread */ - return 0; fail_unreg: |