summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/video/bt8xx/bttv-driver.c')
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c55
1 files changed, 0 insertions, 55 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index 15f10b88a..9877a7124 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -48,9 +48,7 @@
#include <media/tvaudio.h>
#include <media/msp3400.h>
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/dma-mapping.h>
-#endif
#include <asm/io.h>
#include <asm/byteorder.h>
@@ -132,16 +130,7 @@ module_param(uv_ratio, int, 0444);
module_param(full_luma_range, int, 0444);
module_param(coring, int, 0444);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-MODULE_PARM(radio,"1-" __stringify(BTTV_MAX) "i");
-#else
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
-static int dummy;
-module_param_array(radio, int, dummy, 0444);
-#else
module_param_array(radio, int, NULL, 0444);
-#endif
-#endif
MODULE_PARM_DESC(radio,"The TV card supports radio, default is 0 (no)");
MODULE_PARM_DESC(bigendian,"byte order of the framebuffer, default is native endian");
@@ -171,20 +160,14 @@ MODULE_LICENSE("GPL");
/* ----------------------------------------------------------------------- */
/* sysfs */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
static ssize_t show_card(struct device *cd,
struct device_attribute *attr, char *buf)
-#else
-static ssize_t show_card(struct class_device *cd, char *buf)
-#endif
{
struct video_device *vfd = container_of(cd, struct video_device, class_dev);
struct bttv *btv = dev_get_drvdata(vfd->dev);
return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
}
static DEVICE_ATTR(card, S_IRUGO, show_card, NULL);
-#endif
/* ----------------------------------------------------------------------- */
/* dvb auto-load setup */
@@ -198,9 +181,6 @@ static void request_module_async(struct work_struct *work)
request_module("dvb-bt8xx");
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#define request_modules(dev)
-#else
static void request_modules(struct bttv *dev)
{
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
@@ -210,7 +190,6 @@ static void request_modules(struct bttv *dev)
#endif
schedule_work(&dev->request_module_wk);
}
-#endif
#else
#define request_modules(dev)
#endif /* CONFIG_MODULES */
@@ -3391,9 +3370,7 @@ static const struct file_operations bttv_fops =
.open = bttv_open,
.release = bttv_release,
.ioctl = video_ioctl2,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
.compat_ioctl = v4l_compat_ioctl32,
-#endif
.llseek = no_llseek,
.read = bttv_read,
.mmap = bttv_mmap,
@@ -3672,9 +3649,7 @@ static const struct file_operations radio_fops =
.open = radio_open,
.read = radio_read,
.release = radio_release,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
.compat_ioctl = v4l_compat_ioctl32,
-#endif
.ioctl = video_ioctl2,
.llseek = no_llseek,
.poll = radio_poll,
@@ -4115,10 +4090,8 @@ static irqreturn_t bttv_irq(int irq, void *dev_id)
btv=(struct bttv *)dev_id;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
if (btv->custom_irq)
handled = btv->custom_irq(btv);
-#endif
count=0;
while (1) {
@@ -4156,9 +4129,7 @@ static irqreturn_t bttv_irq(int irq, void *dev_id)
if ((astat & BT848_INT_GPINT) && btv->remote) {
wake_up(&btv->gpioq);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
bttv_input_irq(btv);
-#endif
}
if (astat & BT848_INT_I2CDONE) {
@@ -4238,10 +4209,8 @@ static struct video_device *vdev_init(struct bttv *btv,
return NULL;
*vfd = *template;
vfd->minor = -1;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
vfd->dev = &btv->c.pci->dev;
vfd->release = video_device_release;
-#endif
vfd->type = type;
vfd->debug = bttv_debug;
snprintf(vfd->name, sizeof(vfd->name), "BT%d%s %s (%s)",
@@ -4394,11 +4363,7 @@ static int __devinit bttv_probe(struct pci_dev *dev,
btv->c.nr);
return -EIO;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,7)
- if (pci_set_dma_mask(dev, 0xffffffff)) {
-#else
if (pci_set_dma_mask(dev, DMA_32BIT_MASK)) {
-#endif
printk(KERN_WARNING "bttv%d: No suitable DMA available.\n",
btv->c.nr);
return -EIO;
@@ -4509,13 +4474,11 @@ static int __devinit bttv_probe(struct pci_dev *dev,
disclaim_video_lines(btv);
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
/* add subdevices and autoload dvb-bt8xx if needed */
if (bttv_tvcards[btv->c.type].has_dvb) {
bttv_sub_add_device(&btv->c, "dvb");
request_modules(btv);
}
-#endif
bttv_input_init(btv);
@@ -4554,9 +4517,7 @@ static void __devexit bttv_remove(struct pci_dev *pci_dev)
btv->shutdown=1;
wake_up(&btv->gpioq);
bttv_input_fini(btv);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
bttv_sub_del_devices(&btv->c);
-#endif
/* unregister i2c_bus + input */
fini_bttv_i2c(btv);
@@ -4584,11 +4545,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
struct bttv_buffer_set idle;
unsigned long flags;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13)
dprintk("bttv%d: suspend %d\n", btv->c.nr, state.event);
-#else
- dprintk("bttv%d: suspend %d\n", btv->c.nr, state);
-#endif
/* stop dma + irqs */
spin_lock_irqsave(&btv->s_lock,flags);
@@ -4609,11 +4566,7 @@ static int bttv_suspend(struct pci_dev *pci_dev, pm_message_t state)
btv->state.gpio_data = gpio_read();
/* save pci state */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
- pci_save_state(pci_dev, btv->state.pci_cfg);
-#else
pci_save_state(pci_dev);
-#endif
if (0 != pci_set_power_state(pci_dev, pci_choose_state(pci_dev, state))) {
pci_disable_device(pci_dev);
btv->state.disabled = 1;
@@ -4648,11 +4601,7 @@ static int bttv_resume(struct pci_dev *pci_dev)
return err;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10)
- pci_restore_state(pci_dev, btv->state.pci_cfg);
-#else
pci_restore_state(pci_dev);
-#endif
/* restore bt878 state */
bttv_reinit_bt848(btv);
@@ -4722,13 +4671,11 @@ static int __init bttv_init_module(void)
bttv_check_chipset();
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
ret = bus_register(&bttv_sub_bus_type);
if (ret < 0) {
printk(KERN_WARNING "bttv: bus_register error: %d\n", ret);
return ret;
}
-#endif
ret = pci_register_driver(&bttv_pci_driver);
if (ret < 0)
bus_unregister(&bttv_sub_bus_type);
@@ -4739,9 +4686,7 @@ static int __init bttv_init_module(void)
static void __exit bttv_cleanup_module(void)
{
pci_unregister_driver(&bttv_pci_driver);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
bus_unregister(&bttv_sub_bus_type);
-#endif
}
module_init(bttv_init_module);