diff options
Diffstat (limited to 'linux/drivers')
22 files changed, 70 insertions, 48 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/Kconfig b/linux/drivers/media/dvb/cinergyT2/Kconfig index b5cdd57ec..3d778c5ab 100644 --- a/linux/drivers/media/dvb/cinergyT2/Kconfig +++ b/linux/drivers/media/dvb/cinergyT2/Kconfig @@ -56,7 +56,7 @@ config DVB_CINERGYT2_QUERY_INTERVAL measurements. Please keep in mind that these updates cause traffic on the tuner - control bus and thus may or may not affect receiption sensitivity. + control bus and thus may or may not affect reception sensitivity. The default value should be a safe choice for common applications. diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c index 48569a792..5964b27f9 100644 --- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -1001,7 +1001,7 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state) #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) if (state > 0) { #else - if (state.event > PM_EVENT_ON) { + if (1) { #endif struct cinergyt2 *cinergyt2 = usb_get_intfdata (intf); diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c index c972fe014..9878183ba 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_ringbuffer.c @@ -26,7 +26,6 @@ -#define __KERNEL_SYSCALLS__ #include <linux/errno.h> #include <linux/kernel.h> #include <linux/module.h> diff --git a/linux/drivers/media/dvb/dvb-usb/usb-urb.c b/linux/drivers/media/dvb/dvb-usb/usb-urb.c index 8728cf347..572b2d9aa 100644 --- a/linux/drivers/media/dvb/dvb-usb/usb-urb.c +++ b/linux/drivers/media/dvb/dvb-usb/usb-urb.c @@ -122,8 +122,9 @@ static int usb_allocate_stream_buffers(struct usb_data_stream *stream, int num, usb_free_stream_buffers(stream); return -ENOMEM; } - deb_mem("buffer %d: %p (dma: %u)\n", - stream->buf_num, stream->buf_list[stream->buf_num], stream->dma_addr[stream->buf_num]); + deb_mem("buffer %d: %p (dma: %Lu)\n", + stream->buf_num, +stream->buf_list[stream->buf_num], (long long)stream->dma_addr[stream->buf_num]); memset(stream->buf_list[stream->buf_num],0,size); stream->state |= USB_STATE_URB_BUF; } diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index ac91d7350..36dd35db4 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -226,7 +226,7 @@ static void ttusb_dec_handle_irq( struct urb *urb, struct pt_regs *regs) case -ECONNRESET: case -ENOENT: case -ESHUTDOWN: - case -ETIMEDOUT: + case -ETIME: /* this urb is dead, cleanup */ dprintk("%s:urb shutting down with status: %d\n", __FUNCTION__, urb->status); diff --git a/linux/drivers/media/radio/Kconfig b/linux/drivers/media/radio/Kconfig index 7015517e2..6d96b17a7 100644 --- a/linux/drivers/media/radio/Kconfig +++ b/linux/drivers/media/radio/Kconfig @@ -195,8 +195,7 @@ config RADIO_MIROPCM20_RDS ---help--- Choose Y here if you want to see RDS/RBDS information like RadioText, Programme Service name, Clock Time and date, Programme - TYpe and Traffic Announcement/Programme identification. You also - need to say Y to "miroSOUND PCM20 radio" and devfs! + Type and Traffic Announcement/Programme identification. It's not possible to read the raw RDS packets from the device, so the driver cant provide an V4L interface for this. But the diff --git a/linux/drivers/media/radio/radio-gemtek-pci.c b/linux/drivers/media/radio/radio-gemtek-pci.c index 83c7e0e5c..75f2756c1 100644 --- a/linux/drivers/media/radio/radio-gemtek-pci.c +++ b/linux/drivers/media/radio/radio-gemtek-pci.c @@ -450,7 +450,7 @@ static int __init gemtek_pci_init_module( void ) static void __exit gemtek_pci_cleanup_module( void ) { - return pci_unregister_driver( &gemtek_pci_driver ); + pci_unregister_driver(&gemtek_pci_driver); } MODULE_AUTHOR( "Vladimir Shebordaev <vshebordaev@mail.ru>" ); diff --git a/linux/drivers/media/video/Kconfig b/linux/drivers/media/video/Kconfig index c59a01984..fbe5b6168 100644 --- a/linux/drivers/media/video/Kconfig +++ b/linux/drivers/media/video/Kconfig @@ -353,7 +353,7 @@ config VIDEO_SAA6588 help Support for Radio Data System (RDS) decoder. This allows seeing radio station identification transmitted using this standard. - Currentlly, it works only with bt8x8 chips. + Currently, it works only with bt8x8 chips. To compile this driver as a module, choose M here: the module will be called saa6588. diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index a4b9e9f81..7a3da391d 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -113,7 +113,6 @@ static struct i2c_algo_bit_data bttv_i2c_algo_bit_template = { .getsda = bttv_bit_getsda, .getscl = bttv_bit_getscl, .udelay = 16, - .mdelay = 10, .timeout = 200, }; diff --git a/linux/drivers/media/video/cpia2/cpia2.h b/linux/drivers/media/video/cpia2/cpia2.h index b7226a418..24c47092e 100644 --- a/linux/drivers/media/video/cpia2/cpia2.h +++ b/linux/drivers/media/video/cpia2/cpia2.h @@ -51,10 +51,6 @@ /*** * Image defines ***/ -#ifndef true -#define true 1 -#define false 0 -#endif /* Misc constants */ #define ALLOW_CORRUPT 0 /* Causes collater to discard checksum */ diff --git a/linux/drivers/media/video/cx88/Kconfig b/linux/drivers/media/video/cx88/Kconfig index 51d68f32a..0f9d96963 100644 --- a/linux/drivers/media/video/cx88/Kconfig +++ b/linux/drivers/media/video/cx88/Kconfig @@ -69,6 +69,6 @@ config VIDEO_CX88_VP3054 depends on VIDEO_CX88_DVB && DVB_MT352 ---help--- This adds DVB-T support for cards based on the - Connexant 2388x chip and the MT352 demodulator, + Conexant 2388x chip and the MT352 demodulator, which also require support for the VP-3054 Secondary I2C bus, such at DNTV Live! DVB-T Pro. diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 672747a5f..da24a0a56 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -174,7 +174,6 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { .getsda = cx8800_bit_getsda, .getscl = cx8800_bit_getscl, .udelay = 16, - .mdelay = 10, .timeout = 200, }; diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index e36a9dccf..f2afc1cdc 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -613,6 +613,8 @@ struct cx8802_driver * cx8802_get_driver(struct cx8802_dev *dev, enum cx88_board list_for_each(list,&cx8802_devlist) { h = list_entry(list, struct cx8802_dev, devlist); + if (h != dev) + continue; list_for_each(list2, &h->drvlist.devlist) { d = list_entry(list2, struct cx8802_driver, devlist); diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 9782a3799..1f1640f0f 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1779,6 +1779,30 @@ int cx88_do_ioctl(struct inode *inode, struct file *file, int radio, mutex_unlock(&core->lock); return 0; } +#ifdef CONFIG_VIDEO_ADV_DEBUG + /* ioctls to allow direct acces to the cx2388x registers */ + case VIDIOC_INT_G_REGISTER: + { + struct v4l2_register *reg = arg; + + if (reg->i2c_id != 0) + return -EINVAL; + /* cx2388x has a 24-bit register space */ + reg->val = cx_read(reg->reg&0xffffff); + return 0; + } + case VIDIOC_INT_S_REGISTER: + { + struct v4l2_register *reg = arg; + + if (reg->i2c_id != 0) + return -EINVAL; + if (!capable(CAP_SYS_ADMIN)) + return -EPERM; + cx_write(reg->reg&0xffffff, reg->val); + return 0; + } +#endif default: return v4l_compat_translate_ioctl(inode,file,cmd,arg, diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index 504a02215..e9dd18827 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -104,7 +104,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = { .getsda = vp3054_bit_getsda, .getscl = vp3054_bit_getscl, .udelay = 16, - .mdelay = 10, .timeout = 200, }; diff --git a/linux/drivers/media/video/ov511.c b/linux/drivers/media/video/ov511.c index 51e4c4dfe..aeb30bdbc 100644 --- a/linux/drivers/media/video/ov511.c +++ b/linux/drivers/media/video/ov511.c @@ -301,10 +301,11 @@ static struct symbolic_list senlist[] = { static struct symbolic_list urb_errlist[] = { { -ENOSR, "Buffer error (overrun)" }, { -EPIPE, "Stalled (device not responding)" }, - { -EOVERFLOW, "Babble (bad cable?)" }, + { -EOVERFLOW, "Babble (device sends too much data)" }, { -EPROTO, "Bit-stuff error (bad cable?)" }, - { -EILSEQ, "CRC/Timeout" }, - { -ETIMEDOUT, "NAK (device does not respond)" }, + { -EILSEQ, "CRC/Timeout (bad cable?)" }, + { -ETIME, "Device does not respond to token" }, + { -ETIMEDOUT, "Device does not respond to command" }, { -1, NULL } }; diff --git a/linux/drivers/media/video/pwc/philips.txt b/linux/drivers/media/video/pwc/philips.txt index 11f751a6b..f5e848410 100644 --- a/linux/drivers/media/video/pwc/philips.txt +++ b/linux/drivers/media/video/pwc/philips.txt @@ -175,8 +175,8 @@ dev_hint - If a device node is already occupied, registration will fail and the webcam is not available. - You can have up to 64 video devices; be sure to make enough device - nodes in /dev if you want to spread the numbers (this does not apply - to devfs). After /dev/video9 comes /dev/video10 (not /dev/videoA). + nodes in /dev if you want to spread the numbers. + After /dev/video9 comes /dev/video10 (not /dev/videoA). - If a camera does not match any dev_hint, it will simply get assigned the first available device node, just as it used to be. diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index dd731a8e7..f00a606c5 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -736,7 +736,7 @@ static void pwc_isoc_handler(struct urb *urb, struct pt_regs *regs) case -EOVERFLOW: errmsg = "Babble (bad cable?)"; break; case -EPROTO: errmsg = "Bit-stuff error (bad cable?)"; break; case -EILSEQ: errmsg = "CRC/Timeout (could be anything)"; break; - case -ETIMEDOUT: errmsg = "NAK (device does not respond)"; break; + case -ETIME: errmsg = "Device does not respond"; break; } PWC_DEBUG_FLOW("pwc_isoc_handler() called with status %d [%s].\n", urb->status, errmsg); /* Give up after a number of contiguous errors on the USB bus. diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index b907f6f23..61672a219 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -279,7 +279,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, /* Get first addr pointed to pixel position */ oldpg=get_addr_pos(pos,pages,to_addr); - pg=pfn_to_page(to_addr[oldpg].sg->dma_address >> PAGE_SHIFT); + pg=pfn_to_page(sg_dma_address(to_addr[oldpg].sg) >> PAGE_SHIFT); basep = kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[oldpg].sg->offset; /* We will just duplicate the second pixel at the packet */ @@ -294,7 +294,7 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, for (color=0;color<4;color++) { pgpos=get_addr_pos(pos,pages,to_addr); if (pgpos!=oldpg) { - pg=pfn_to_page(to_addr[pgpos].sg->dma_address >> PAGE_SHIFT); + pg=pfn_to_page(sg_dma_address(to_addr[pgpos].sg) >> PAGE_SHIFT); kunmap_atomic(basep, KM_BOUNCE_READ); basep= kmap_atomic(pg, KM_BOUNCE_READ)+to_addr[pgpos].sg->offset; oldpg=pgpos; @@ -346,8 +346,8 @@ static void gen_line(struct sg_to_addr to_addr[],int inipos,int pages,int wmax, for (color=0;color<4;color++) { pgpos=get_addr_pos(pos,pages,to_addr); if (pgpos!=oldpg) { - pg=pfn_to_page(to_addr[pgpos]. - sg->dma_address + pg=pfn_to_page(sg_dma_address( + to_addr[pgpos].sg) >> PAGE_SHIFT); kunmap_atomic(basep, KM_BOUNCE_READ); @@ -405,7 +405,7 @@ static void vivi_fillbuff(struct vivi_dev *dev,struct vivi_buffer *buf) struct timeval ts; /* Test if DMA mapping is ready */ - if (!vb->dma.sglist[0].dma_address) + if (!sg_dma_address(&vb->dma.sglist[0])) return; prep_to_addr(to_addr,vb); @@ -859,7 +859,7 @@ static int vivi_map_sg(void *dev, struct scatterlist *sg, int nents, for (i = 0; i < nents; i++ ) { BUG_ON(!sg[i].page); - sg[i].dma_address = page_to_phys(sg[i].page) + sg[i].offset; + sg_dma_address(&sg[i]) = page_to_phys(sg[i].page) + sg[i].offset; } return nents; diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c index 20f211b55..2912326a5 100644 --- a/linux/drivers/media/video/w9968cf.c +++ b/linux/drivers/media/video/w9968cf.c @@ -586,15 +586,14 @@ static struct w9968cf_symbolic_list urb_errlist[] = { { -EFBIG, "Too much ISO frames requested" }, { -ENOSR, "Buffer error (overrun)" }, { -EPIPE, "Specified endpoint is stalled (device not responding)"}, - { -EOVERFLOW, "Babble (bad cable?)" }, + { -EOVERFLOW, "Babble (too much data)" }, { -EPROTO, "Bit-stuff error (bad cable?)" }, { -EILSEQ, "CRC/Timeout" }, - { -ETIMEDOUT, "NAK (device does not respond)" }, + { -ETIME, "Device does not respond to token" }, + { -ETIMEDOUT, "Device does not respond to command" }, { -1, NULL } }; - - /**************************************************************************** * Memory management functions * ****************************************************************************/ diff --git a/linux/drivers/media/video/zoran_card.c b/linux/drivers/media/video/zoran_card.c index d929791ad..cbd046a3a 100644 --- a/linux/drivers/media/video/zoran_card.c +++ b/linux/drivers/media/video/zoran_card.c @@ -823,7 +823,6 @@ static struct i2c_algo_bit_data zoran_i2c_bit_data_template = { .getsda = zoran_i2c_getsda, .getscl = zoran_i2c_getscl, .udelay = 10, - .mdelay = 0, .timeout = 100, }; @@ -1282,9 +1281,7 @@ find_zr36057 (void) zoran_num = 0; while (zoran_num < BUZ_MAX && - (dev = - pci_find_device(PCI_VENDOR_ID_ZORAN, - PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { + (dev = pci_get_device(PCI_VENDOR_ID_ZORAN, PCI_DEVICE_ID_ZORAN_36057, dev)) != NULL) { card_num = card[zoran_num]; zr = &zoran[zoran_num]; memset(zr, 0, sizeof(struct zoran)); // Just in case if previous cycle failed @@ -1545,7 +1542,8 @@ find_zr36057 (void) goto zr_detach_vfe; } } - + /* Success so keep the pci_dev referenced */ + pci_dev_get(zr->pci_dev); zoran_num++; continue; @@ -1567,6 +1565,9 @@ find_zr36057 (void) iounmap(zr->zr36057_mem); continue; } + if (dev) /* Clean up ref count on early exit */ + pci_dev_put(dev); + if (zoran_num == 0) { dprintk(1, KERN_INFO "No known MJPEG cards found.\n"); } diff --git a/linux/drivers/media/video/zr36120.c b/linux/drivers/media/video/zr36120.c index 9240638a0..b5ffe53c4 100644 --- a/linux/drivers/media/video/zr36120.c +++ b/linux/drivers/media/video/zr36120.c @@ -1840,16 +1840,16 @@ int __init find_zoran(void) struct zoran *ztv; struct pci_dev *dev = NULL; unsigned char revision; - int zoran_num=0; + int zoran_num = 0; - while ((dev = pci_find_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev))) + while ((dev = pci_get_device(PCI_VENDOR_ID_ZORAN,PCI_DEVICE_ID_ZORAN_36120, dev))) { /* Ok, a ZR36120/ZR36125 found! */ ztv = &zorans[zoran_num]; ztv->dev = dev; if (pci_enable_device(dev)) - return -EIO; + continue; pci_read_config_byte(dev, PCI_CLASS_REVISION, &revision); printk(KERN_INFO "zoran: Zoran %x (rev %d) ", @@ -1867,17 +1867,18 @@ int __init find_zoran(void) { iounmap(ztv->zoran_mem); printk(KERN_ERR "zoran: Bad irq number or handler\n"); - return -EINVAL; + continue; } if (result==-EBUSY) printk(KERN_ERR "zoran: IRQ %d busy, change your PnP config in BIOS\n",dev->irq); if (result < 0) { iounmap(ztv->zoran_mem); - return result; + continue; } /* Enable bus-mastering */ pci_set_master(dev); - + /* Keep a reference */ + pci_dev_get(dev); zoran_num++; } if(zoran_num) @@ -2041,6 +2042,9 @@ void release_zoran(int max) if (ztv->zoran_mem) iounmap(ztv->zoran_mem); + /* Drop PCI device */ + pci_dev_put(ztv->dev); + video_unregister_device(&ztv->video_dev); video_unregister_device(&ztv->vbi_dev); } @@ -2057,13 +2061,12 @@ int __init zr36120_init(void) handle_chipset(); zoran_cards = find_zoran(); - if (zoran_cards<0) - /* no cards found, no need for a driver */ + if (zoran_cards <= 0) return -EIO; /* initialize Zorans */ for (card=0; card<zoran_cards; card++) { - if (init_zoran(card)<0) { + if (init_zoran(card) < 0) { /* only release the zorans we have registered */ release_zoran(card); return -EIO; |