diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 08:26:19 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-08 08:26:19 +0200 |
commit | ea33affdbd8d71fab71e3f62845b9239d6f60ff8 (patch) | |
tree | e0e99b43f896b3323ef7f7386e6ea4666f1b1bf7 | |
parent | 1e35850ac2509c324478d38091880e60ab28795f (diff) | |
download | mediapointer-dvb-s2-ea33affdbd8d71fab71e3f62845b9239d6f60ff8.tar.gz mediapointer-dvb-s2-ea33affdbd8d71fab71e3f62845b9239d6f60ff8.tar.bz2 |
v4l-dvb: remove support for kernels < 2.6.13
From: Hans Verkuil <hverkuil@xs4all.nl>
Phase 3 of the compat cleanup.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
59 files changed, 11 insertions, 480 deletions
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c index 651df056e..e1d76b111 100644 --- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c +++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c @@ -1086,12 +1086,6 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state) if (mutex_lock_interruptible(&cinergyt2->wq_sem)) return -ERESTARTSYS; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - if (state <= 0) { - mutex_unlock(&cinergyt2->wq_sem); - return 0; - } -#endif cinergyt2_suspend_rc(cinergyt2); cancel_rearming_delayed_work(&cinergyt2->query_work); diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index 3439ccec6..2da27de38 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -56,11 +56,7 @@ static const char * const dnames[] = { #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type) #define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) static struct class *dvb_class; -#else -static struct class_simple *dvb_class; -#endif static struct dvb_device* dvbdev_find_device (int minor) { diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c index b47427ea6..b2fae925a 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -9,10 +9,8 @@ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include <linux/usb/input.h> #else -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) #include <linux/usb_input.h> #endif -#endif /* Remote-control poll function - called every dib->rc_query_interval ms to see * whether the remote control has received anything. diff --git a/linux/drivers/media/video/au0828/au0828-dvb.c b/linux/drivers/media/video/au0828/au0828-dvb.c index 709a703fe..0a835354f 100644 --- a/linux/drivers/media/video/au0828/au0828-dvb.c +++ b/linux/drivers/media/video/au0828/au0828-dvb.c @@ -224,17 +224,10 @@ static int dvb_register(struct au0828_dev *dev) "(errno = %d)\n", DRIVER_NAME, result); goto fail_adapter; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb->adapter.priv = dev; /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->frontend); -#else - dvb->adapter->priv = dev; - - /* register frontend */ - result = dvb_register_frontend(dvb->adapter, dvb->frontend); -#endif if (result < 0) { printk(KERN_ERR "%s: dvb_register_frontend failed " "(errno = %d)\n", DRIVER_NAME, result); @@ -260,11 +253,7 @@ static int dvb_register(struct au0828_dev *dev) dvb->dmxdev.filternum = 256; dvb->dmxdev.demux = &dvb->demux.dmx; dvb->dmxdev.capabilities = 0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); -#else - result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter); -#endif if (result < 0) { printk(KERN_ERR "%s: dvb_dmxdev_init failed (errno = %d)\n", DRIVER_NAME, result); @@ -295,11 +284,7 @@ static int dvb_register(struct au0828_dev *dev) } /* register network adapter */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); -#else - dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx); -#endif return 0; fail_fe_conn: @@ -314,11 +299,7 @@ fail_dmx: dvb_unregister_frontend(dvb->frontend); fail_frontend: dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif fail_adapter: return result; } @@ -339,11 +320,7 @@ void au0828_dvb_unregister(struct au0828_dev *dev) dvb_dmx_release(&dvb->demux); dvb_unregister_frontend(dvb->frontend); dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif } /* All the DVB attach calls go here, this function get's modified diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c index 53d219c7d..e860f7725 100644 --- a/linux/drivers/media/video/bt8xx/bt832.c +++ b/linux/drivers/media/video/bt8xx/bt832.c @@ -41,9 +41,6 @@ MODULE_LICENSE("GPL"); /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_ADDR_BT832_ALT1>>1, I2C_ADDR_BT832_ALT2>>1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; int debug; /* debug output */ diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index d63ca727f..36efd08f8 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -160,12 +160,8 @@ MODULE_LICENSE("GPL"); /* ----------------------------------------------------------------------- */ /* sysfs */ -#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); @@ -3374,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, @@ -3655,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, diff --git a/linux/drivers/media/video/compat_ioctl32.c b/linux/drivers/media/video/compat_ioctl32.c index 6b405e75c..017c2a8d4 100644 --- a/linux/drivers/media/video/compat_ioctl32.c +++ b/linux/drivers/media/video/compat_ioctl32.c @@ -12,7 +12,6 @@ * ioctls. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) #include <linux/compat.h> #include <linux/videodev.h> #include <linux/videodev2.h> @@ -996,4 +995,3 @@ long v4l_compat_ioctl32(struct file *file, unsigned int cmd, unsigned long arg) EXPORT_SYMBOL_GPL(v4l_compat_ioctl32); MODULE_LICENSE("GPL"); -#endif diff --git a/linux/drivers/media/video/cs5345.c b/linux/drivers/media/video/cs5345.c index c33e420bd..e2f0b0278 100644 --- a/linux/drivers/media/video/cs5345.c +++ b/linux/drivers/media/video/cs5345.c @@ -41,10 +41,6 @@ MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x98 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c index ebab280a0..bef0950e5 100644 --- a/linux/drivers/media/video/cs53l32a.c +++ b/linux/drivers/media/video/cs53l32a.c @@ -44,10 +44,6 @@ MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On"); static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; /* ----------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/cx18/cx18-streams.c b/linux/drivers/media/video/cx18/cx18-streams.c index deacdb836..df99070e6 100644 --- a/linux/drivers/media/video/cx18/cx18-streams.c +++ b/linux/drivers/media/video/cx18/cx18-streams.c @@ -41,9 +41,7 @@ static struct file_operations cx18_v4l2_enc_fops = { .open = cx18_v4l2_open, /* FIXME change to video_ioctl2 if serialization lock can be removed */ .ioctl = cx18_v4l2_ioctl, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .release = cx18_v4l2_close, .poll = cx18_v4l2_enc_poll, }; diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index a34f83052..6d0345935 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -1637,9 +1637,7 @@ static const struct file_operations video_fops = { .poll = video_poll, .mmap = video_mmap, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; @@ -1690,9 +1688,7 @@ static const struct file_operations radio_fops = { .open = video_open, .release = video_release, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index 98a73e8e0..a43ed390a 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -51,10 +51,6 @@ MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - int cx25840_debug; module_param_named(debug,cx25840_debug, int, 0644); diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index fe58a1f14..63521066d 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -1948,9 +1948,7 @@ static const struct file_operations video_fops = .poll = video_poll, .mmap = video_mmap, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; @@ -2003,9 +2001,7 @@ static const struct file_operations radio_fops = .open = video_open, .release = video_release, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index c04e62739..b8a5c61ce 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -63,11 +63,7 @@ struct em28xx_dvb { int nfeeds; /* general boilerplate stuff */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) struct dvb_adapter adapter; -#else - struct dvb_adapter *adapter; -#endif struct dvb_demux demux; struct dmxdev dmxdev; struct dmx_frontend fe_hw; @@ -303,17 +299,10 @@ int register_dvb(struct em28xx_dvb *dvb, /* Ensure all frontends negotiate bus access */ dvb->frontend->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb->adapter.priv = dev; /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->frontend); -#else - dvb->adapter->priv = dev; - - /* register frontend */ - result = dvb_register_frontend(dvb->adapter, dvb->frontend); -#endif if (result < 0) { printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n", dev->name, result); @@ -340,11 +329,7 @@ int register_dvb(struct em28xx_dvb *dvb, dvb->dmxdev.filternum = 256; dvb->dmxdev.demux = &dvb->demux.dmx; dvb->dmxdev.capabilities = 0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); -#else - result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter); -#endif if (result < 0) { printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n", dev->name, result); @@ -375,11 +360,7 @@ int register_dvb(struct em28xx_dvb *dvb, } /* register network adapter */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); -#else - dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx); -#endif return 0; fail_fe_conn: @@ -394,11 +375,7 @@ fail_dmx: dvb_unregister_frontend(dvb->frontend); fail_frontend: dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif fail_adapter: return result; } @@ -412,11 +389,7 @@ static void unregister_dvb(struct em28xx_dvb *dvb) dvb_dmx_release(&dvb->demux); dvb_unregister_frontend(dvb->frontend); dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif } diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index 8344e87ce..4d6f650da 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -432,18 +432,6 @@ static u32 functionality(struct i2c_adapter *adap) return I2C_FUNC_SMBUS_EMUL; } -#ifndef I2C_PEC -static void inc_use(struct i2c_adapter *adap) -{ - MOD_INC_USE_COUNT; -} - -static void dec_use(struct i2c_adapter *adap) -{ - MOD_DEC_USE_COUNT; -} -#endif - /* * attach_inform() * gets called when a device attaches to the i2c bus @@ -521,12 +509,7 @@ static struct i2c_algorithm em28xx_algo = { }; static struct i2c_adapter em28xx_adap_template = { -#ifdef I2C_PEC .owner = THIS_MODULE, -#else - .inc_use = inc_use, - .dec_use = dec_use, -#endif .class = I2C_CLASS_TV_ANALOG, .name = "em28xx", .id = I2C_HW_B_EM28XX, diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index 098acbd32..5929d0860 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1819,9 +1819,7 @@ static const struct file_operations em28xx_v4l_fops = { .mmap = em28xx_v4l2_mmap, .ioctl = video_ioctl2, .llseek = no_llseek, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif }; static const struct file_operations radio_fops = { @@ -1829,9 +1827,7 @@ static const struct file_operations radio_fops = { .open = em28xx_v4l2_open, .release = em28xx_v4l2_close, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/ivtv/ivtv-streams.c b/linux/drivers/media/video/ivtv/ivtv-streams.c index d2dd89519..f8883b487 100644 --- a/linux/drivers/media/video/ivtv/ivtv-streams.c +++ b/linux/drivers/media/video/ivtv/ivtv-streams.c @@ -49,9 +49,7 @@ static const struct file_operations ivtv_v4l2_enc_fops = { .write = ivtv_v4l2_write, .open = ivtv_v4l2_open, .ioctl = ivtv_v4l2_ioctl, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .release = ivtv_v4l2_close, .poll = ivtv_v4l2_enc_poll, }; @@ -62,9 +60,7 @@ static const struct file_operations ivtv_v4l2_dec_fops = { .write = ivtv_v4l2_write, .open = ivtv_v4l2_open, .ioctl = ivtv_v4l2_ioctl, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 11) .compat_ioctl = v4l_compat_ioctl32, -#endif .release = ivtv_v4l2_close, .poll = ivtv_v4l2_dec_poll, }; diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c index 51b0b2b30..87e948caf 100644 --- a/linux/drivers/media/video/m52790.c +++ b/linux/drivers/media/video/m52790.c @@ -40,10 +40,6 @@ MODULE_LICENSE("GPL"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x90 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index b99d54996..cd92f1f68 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -115,9 +115,7 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing"); /* Addresses to scan */ static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; /* ----------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index cf56b10d9..cbf848e82 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -3120,9 +3120,6 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, write_len, pvr2_ctl_write_complete, hdw); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - hdw->ctl_write_urb->transfer_flags |= URB_ASYNC_UNLINK; -#endif hdw->ctl_write_urb->actual_length = 0; hdw->ctl_write_pend_flag = !0; status = usb_submit_urb(hdw->ctl_write_urb,GFP_KERNEL); @@ -3147,9 +3144,6 @@ static int pvr2_send_request_ex(struct pvr2_hdw *hdw, read_len, pvr2_ctl_read_complete, hdw); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - hdw->ctl_read_urb->transfer_flags |= URB_ASYNC_UNLINK; -#endif hdw->ctl_read_urb->actual_length = 0; hdw->ctl_read_pend_flag = !0; status = usb_submit_urb(hdw->ctl_read_urb,GFP_KERNEL); diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c index 362ec49f5..797017066 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c @@ -1017,9 +1017,6 @@ static int pvr2_i2c_detach_inform(struct i2c_client *client) } static struct i2c_algorithm pvr2_i2c_algo_template = { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - .id = I2C_HW_B_BT848, -#endif .master_xfer = pvr2_i2c_xfer, .functionality = pvr2_i2c_functionality, }; @@ -1081,9 +1078,6 @@ void pvr2_i2c_core_init(struct pvr2_hdw *hdw) memcpy(&hdw->i2c_algo,&pvr2_i2c_algo_template,sizeof(hdw->i2c_algo)); strlcpy(hdw->i2c_adap.name,hdw->name,sizeof(hdw->i2c_adap.name)); hdw->i2c_adap.dev.parent = &hdw->usb_dev->dev; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - strlcpy(hdw->i2c_algo.name,hdw->name,sizeof(hdw->i2c_algo.name)); -#endif hdw->i2c_adap.algo = &hdw->i2c_algo; hdw->i2c_adap.algo_data = hdw; hdw->i2c_pend_mask = 0; diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 0ac103a8c..c28490ae5 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -841,11 +841,7 @@ int pwc_isoc_init(struct pwc_device *pdev) pdev->vmax_packet_size = -1; for (i = 0; i < idesc->desc.bNumEndpoints; i++) { if ((idesc->endpoint[i].desc.bEndpointAddress & 0xF) == pdev->vendpoint) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) - pdev->vmax_packet_size = idesc->endpoint[i].desc.wMaxPacketSize; -#else pdev->vmax_packet_size = le16_to_cpu(idesc->endpoint[i].desc.wMaxPacketSize); -#endif break; } } @@ -1498,13 +1494,8 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id int video_nr = -1; /* default: use next available device */ char serial_number[30], *name; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) - vendor_id = udev->descriptor.idVendor; - product_id = udev->descriptor.idProduct; -#else vendor_id = le16_to_cpu(udev->descriptor.idVendor); product_id = le16_to_cpu(udev->descriptor.idProduct); -#endif /* Check if we can handle this device */ PWC_DEBUG_PROBE("probe() called [%04X %04X], if %d\n", @@ -1785,11 +1776,7 @@ static int usb_pwc_probe(struct usb_interface *intf, const struct usb_device_id pdev->vdev->owner = THIS_MODULE; video_set_drvdata(pdev->vdev, pdev); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) - pdev->release = udev->descriptor.bcdDevice; -#else pdev->release = le16_to_cpu(udev->descriptor.bcdDevice); -#endif PWC_DEBUG_PROBE("Release: %04x\n", pdev->release); /* Now search device_hint[] table for a match, so we can hint a node number. */ diff --git a/linux/drivers/media/video/pwc/pwc-ioctl.h b/linux/drivers/media/video/pwc/pwc-ioctl.h index 58904acda..8c0cae7b3 100644 --- a/linux/drivers/media/video/pwc/pwc-ioctl.h +++ b/linux/drivers/media/video/pwc/pwc-ioctl.h @@ -54,11 +54,6 @@ #include <linux/types.h> #include <linux/version.h> -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10) -/* Compatibility for older kernel */ -typedef __u16 __le16; -#endif - /* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 #define PSZ_QSIF 0x01 diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c index 900185cf2..2ea5d70a9 100644 --- a/linux/drivers/media/video/saa5246a.c +++ b/linux/drivers/media/video/saa5246a.c @@ -73,9 +73,7 @@ static struct video_device saa_template; /* Declared near bottom */ /* Addresses to scan */ static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; static struct i2c_client client_template; diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c index be71833d0..4443a023c 100644 --- a/linux/drivers/media/video/saa5249.c +++ b/linux/drivers/media/video/saa5249.c @@ -137,9 +137,7 @@ static struct video_device saa_template; /* Declared near bottom */ /* Addresses to scan */ static unsigned short normal_i2c[] = {34>>1,I2C_CLIENT_END}; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; static struct i2c_client client_template; diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 6b5e3b5b2..5efa5ab66 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -41,9 +41,6 @@ static unsigned short normal_i2c[] = { I2C_CLIENT_END, }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; /* insmod options */ diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index 0275def5b..5d99f8455 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -68,10 +68,6 @@ static unsigned short normal_i2c[] = { 0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */ I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; struct saa711x_state { diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c index 2ca3493dd..28905adfb 100644 --- a/linux/drivers/media/video/saa7127.c +++ b/linux/drivers/media/video/saa7127.c @@ -73,10 +73,6 @@ MODULE_PARM_DESC(test_image, "test_image (0-1)"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 9e0e9f7b2..0143c8b28 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -21,9 +21,7 @@ /* Addresses to scan */ static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END}; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder"); @@ -801,8 +799,6 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) static struct i2c_driver driver = { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "saa6752hs", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c index 33ad87e6b..e02bd2659 100644 --- a/linux/drivers/media/video/saa7134/saa7134-video.c +++ b/linux/drivers/media/video/saa7134/saa7134-video.c @@ -2356,9 +2356,7 @@ static const struct file_operations video_fops = .poll = video_poll, .mmap = video_mmap, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; @@ -2368,9 +2366,7 @@ static const struct file_operations radio_fops = .open = video_open, .release = video_release, .ioctl = video_ioctl2, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index 6f9f90cc6..a478bf25e 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -56,9 +56,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x42 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 265a09690..1305820d2 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -73,9 +73,7 @@ static unsigned short normal_i2c[] = { I2C_ADDR_TDA7432 >> 1, I2C_CLIENT_END, }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; /* Structure of address and subaddresses for the tda7432 */ diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index 48675e2e1..537a06492 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -51,9 +51,6 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); /* addresses to scan, found only at 0x42 (7-Bit) */ static unsigned short normal_i2c[] = { I2C_ADDR_TDA9840, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index e1c7550d5..86e721656 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -42,9 +42,7 @@ static unsigned short normal_i2c[] = { I2C_ADDR_TDA9875 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif + I2C_CLIENT_INSMOD; /* This is a superset of the TDA9875 */ diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index 989dd8589..cb700dde7 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -51,9 +51,6 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); /* addresses to scan, found only at 0x03 and/or 0x43 (7-bit) */ static unsigned short normal_i2c[] = { I2C_TEA6415C_1, I2C_TEA6415C_2, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 6c244ca15..f1bba1568 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -48,9 +48,6 @@ MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off)."); /* addresses to scan, found only at 0x4c and/or 0x4d (7-Bit) */ static unsigned short normal_i2c[] = { I2C_ADDR_TEA6420_1, I2C_ADDR_TEA6420_2, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif /* magic definition of all other variables and things */ I2C_CLIENT_INSMOD; diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c index 6c463a6f7..b601c232a 100644 --- a/linux/drivers/media/video/tlv320aic23b.c +++ b/linux/drivers/media/video/tlv320aic23b.c @@ -40,10 +40,6 @@ MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x34 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; /* ----------------------------------------------------------------------- */ diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 32554f1cf..d80f7ee91 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -111,9 +111,6 @@ static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; /* insmod options used at init time => read/only */ diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index b40ebd0a3..84e2c43b7 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -147,9 +147,6 @@ static unsigned short normal_i2c[] = { I2C_ADDR_TDA9874 >> 1, I2C_ADDR_PIC16C54 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; /* ---------------------------------------------------------------------- */ @@ -279,9 +276,7 @@ static int chip_thread(void *data) if (!kthread_should_stop()) schedule(); set_current_state(TASK_RUNNING); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12) try_to_freeze(); -#endif if (kthread_should_stop()) break; v4l_dbg(1, debug, chip->c, "%s: thread wakeup\n", chip->c->name); diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index 4260b833a..2862efa93 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -196,10 +196,6 @@ static int tvmixer_open(struct inode *inode, struct file *file) /* lock bttv in memory while the mixer is in use */ file->private_data = mix; -#ifndef I2C_PEC - if (client->adapter->inc_use) - client->adapter->inc_use(client->adapter); -#endif if (client->adapter->owner) try_module_get(client->adapter->owner); return 0; @@ -215,10 +211,6 @@ static int tvmixer_release(struct inode *inode, struct file *file) return -ENODEV; } -#ifndef I2C_PEC - if (client->adapter->dec_use) - client->adapter->dec_use(client->adapter); -#endif module_put(client->adapter->owner); return 0; } diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index bb88eb5c0..3c0e2b316 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -26,9 +26,6 @@ static unsigned short normal_i2c[] = { I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif I2C_CLIENT_INSMOD; static int debug; @@ -1230,8 +1227,6 @@ static int tvp5150_detach_client(struct i2c_client *c) static struct i2c_driver driver = { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tvp5150", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c index 05e84aed0..dfca5ed6e 100644 --- a/linux/drivers/media/video/upd64031a.c +++ b/linux/drivers/media/video/upd64031a.c @@ -53,10 +53,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x24 >> 1, 0x26 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index b1981d6bc..5f0c6919d 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -44,10 +44,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0xb8 >> 1, 0xba >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c index 7e2f04fb4..6fef59557 100644 --- a/linux/drivers/media/video/usbvideo/konicawc.c +++ b/linux/drivers/media/video/usbvideo/konicawc.c @@ -17,10 +17,8 @@ #include <linux/init.h> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include <linux/usb/input.h> -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) -#include <linux/usb_input.h> #else -#include <linux/input.h> +#include <linux/usb_input.h> #endif #include "usbvideo.h" diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c index a4f1185c0..69f0fc770 100644 --- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c +++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c @@ -35,7 +35,7 @@ #include <linux/input.h> #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include <linux/usb/input.h> -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +#else #include <linux/usb_input.h> #endif diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c index e09d0bea5..1b6180573 100644 --- a/linux/drivers/media/video/usbvision/usbvision-i2c.c +++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c @@ -193,25 +193,9 @@ static u32 functionality(struct i2c_adapter *adap) return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR; } -#ifndef I2C_PEC -static void inc_use(struct i2c_adapter *adap) -{ - MOD_INC_USE_COUNT; -} - -static void dec_use(struct i2c_adapter *adap) -{ - MOD_DEC_USE_COUNT; -} -#endif - /* -----exported algorithm data: ------------------------------------- */ static struct i2c_algorithm usbvision_algo = { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - .name = "USB algorithm", - .id = I2C_ALGO_BIT, /* FIXME */ -#endif .master_xfer = usbvision_i2c_xfer, .smbus_xfer = NULL, .functionality = functionality, @@ -228,9 +212,6 @@ static int usbvision_i2c_usb_add_bus(struct i2c_adapter *adap) /* register new adapter to i2c module... */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) - adap->id |= usbvision_algo.id; -#endif adap->algo = &usbvision_algo; adap->timeout = 100; /* default values, should */ @@ -530,12 +511,7 @@ static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char add } static struct i2c_adapter i2c_adap_template = { -#ifdef I2C_PEC .owner = THIS_MODULE, -#else - .inc_use = inc_use, - .dec_use = dec_use, -#endif .name = "usbvision", .id = I2C_HW_B_BT848, /* FIXME */ .client_register = attach_inform, @@ -545,9 +521,6 @@ static struct i2c_adapter i2c_adap_template = { static struct i2c_client i2c_client_template = { .name = "usbvision internal", -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 11) - .id = -1, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .flags = I2C_CLIENT_ALLOW_USE, #endif diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index bd3d49abf..073d30454 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -1386,9 +1386,7 @@ static const struct file_operations usbvision_fops = { .ioctl = video_ioctl2, .llseek = no_llseek, /* .poll = video_poll, */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif }; static struct video_device usbvision_video_template = { .owner = THIS_MODULE, @@ -1440,9 +1438,7 @@ static const struct file_operations usbvision_radio_fops = { .release = usbvision_radio_close, .ioctl = video_ioctl2, .llseek = no_llseek, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif }; static struct video_device usbvision_radio_template= @@ -1478,9 +1474,7 @@ static const struct file_operations usbvision_vbi_fops = { .release = usbvision_vbi_close, .ioctl = usbvision_vbi_ioctl, .llseek = no_llseek, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif }; static struct video_device usbvision_vbi_template= diff --git a/linux/drivers/media/video/videobuf-dvb.c b/linux/drivers/media/video/videobuf-dvb.c index 918c4574e..d9979ab26 100644 --- a/linux/drivers/media/video/videobuf-dvb.c +++ b/linux/drivers/media/video/videobuf-dvb.c @@ -159,17 +159,10 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb, dvb->name, result); goto fail_adapter; } -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) dvb->adapter.priv = adapter_priv; /* register frontend */ result = dvb_register_frontend(&dvb->adapter, dvb->frontend); -#else - dvb->adapter->priv = adapter_priv; - - /* register frontend */ - result = dvb_register_frontend(dvb->adapter, dvb->frontend); -#endif if (result < 0) { printk(KERN_WARNING "%s: dvb_register_frontend failed (errno = %d)\n", dvb->name, result); @@ -195,11 +188,7 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb, dvb->dmxdev.filternum = 256; dvb->dmxdev.demux = &dvb->demux.dmx; dvb->dmxdev.capabilities = 0; -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) result = dvb_dmxdev_init(&dvb->dmxdev, &dvb->adapter); -#else - result = dvb_dmxdev_init(&dvb->dmxdev, dvb->adapter); -#endif if (result < 0) { printk(KERN_WARNING "%s: dvb_dmxdev_init failed (errno = %d)\n", dvb->name, result); @@ -230,11 +219,7 @@ int videobuf_dvb_register(struct videobuf_dvb *dvb, } /* register network adapter */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) dvb_net_init(&dvb->adapter, &dvb->net, &dvb->demux.dmx); -#else - dvb_net_init(dvb->adapter, &dvb->net, &dvb->demux.dmx); -#endif return 0; fail_fe_conn: @@ -249,11 +234,7 @@ fail_dmx: dvb_unregister_frontend(dvb->frontend); fail_frontend: dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif fail_adapter: return result; } @@ -267,11 +248,7 @@ void videobuf_dvb_unregister(struct videobuf_dvb *dvb) dvb_dmx_release(&dvb->demux); dvb_unregister_frontend(dvb->frontend); dvb_frontend_detach(dvb->frontend); -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) dvb_unregister_adapter(&dvb->adapter); -#else - dvb_unregister_adapter(dvb->adapter); -#endif } EXPORT_SYMBOL(videobuf_dvb_register); diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index 8c74621db..91fcf1695 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -379,42 +379,22 @@ EXPORT_SYMBOL(v4l_printk_ioctl); * sysfs stuff */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static ssize_t show_index(struct class_device *cd, char *buf) -#else static ssize_t show_index(struct device *cd, struct device_attribute *attr, char *buf) -#endif { struct video_device *vfd = container_of(cd, struct video_device, class_dev); return sprintf(buf, "%i\n", vfd->index); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static ssize_t show_name(struct class_device *cd, char *buf) -#else static ssize_t show_name(struct device *cd, struct device_attribute *attr, char *buf) -#endif { struct video_device *vfd = container_of(cd, struct video_device, class_dev); return sprintf(buf, "%.*s\n", (int)sizeof(vfd->name), vfd->name); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) -static ssize_t show_dev(struct class_device *cd, char *buf) -{ - struct video_device *vfd = container_of(cd, struct video_device, - class_dev); - dev_t dev = MKDEV(VIDEO_MAJOR, vfd->minor); - return print_dev_t(buf,dev); -} - -static DEVICE_ATTR(dev, S_IRUGO, show_dev, NULL); - -#endif struct video_device *video_device_alloc(void) { struct video_device *vfd; @@ -430,11 +410,7 @@ void video_device_release(struct video_device *vfd) } EXPORT_SYMBOL(video_device_release); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static void video_release(struct class_device *cd) -#else static void video_release(struct device *cd) -#endif { struct video_device *vfd = container_of(cd, struct video_device, class_dev); @@ -447,22 +423,16 @@ static void video_release(struct device *cd) vfd->release(vfd); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) static struct device_attribute video_device_attrs[] = { __ATTR(name, S_IRUGO, show_name, NULL), __ATTR(index, S_IRUGO, show_index, NULL), __ATTR_NULL }; -#endif static struct class video_class = { .name = VIDEO_NAME, -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) - .release = video_release, -#else .dev_attrs = video_device_attrs, .dev_release = video_release, -#endif }; /* @@ -2229,46 +2199,17 @@ int video_register_device_index(struct video_device *vfd, int type, int nr, /* sysfs class */ memset(&vfd->class_dev, 0x00, sizeof(vfd->class_dev)); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) - if (vfd->dev) - vfd->class_dev.dev = vfd->dev; -#else if (vfd->dev) vfd->class_dev.parent = vfd->dev; -#endif vfd->class_dev.class = &video_class; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12) vfd->class_dev.devt = MKDEV(VIDEO_MAJOR, vfd->minor); -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) - sprintf(vfd->class_dev.class_id, "%s%d", name_base, i - base); -#else sprintf(vfd->class_dev.bus_id, "%s%d", name_base, i - base); -#endif ret = device_register(&vfd->class_dev); if (ret < 0) { printk(KERN_ERR "%s: device_register failed\n", __func__); goto fail_minor; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) - ret = class_device_create_file(&vfd->class_dev, &class_device_attr_name); - if (ret < 0) { - printk(KERN_ERR "%s: class_device_create_file 'name' failed\n", - __FUNCTION__); - class_device_unregister(&vfd->class_dev); - goto fail_minor; - } -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,12) - ret = class_device_create_file(&vfd->class_dev, &class_device_attr_dev); - if (ret < 0) { - printk(KERN_ERR "%s: class_device_create_file 'dev' failed\n", - __FUNCTION__); - class_device_unregister(&vfd->class_dev); - goto fail_minor; - } -#endif #if 1 /* keep */ /* needed until all drivers are fixed */ diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 5d29fb09c..98ee2225c 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -1067,9 +1067,7 @@ static const struct file_operations vivi_fops = { .read = vivi_read, .poll = vivi_poll, .ioctl = video_ioctl2, /* V4L2 ioctl handler */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11) .compat_ioctl = v4l_compat_ioctl32, -#endif .mmap = vivi_mmap, .llseek = no_llseek, }; diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index e2d6d7a2c..6c47c5e5a 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -40,10 +40,6 @@ MODULE_LICENSE("GPL"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0xb6 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c index e2df9f80e..b361d0d42 100644 --- a/linux/drivers/media/video/wm8739.c +++ b/linux/drivers/media/video/wm8739.c @@ -46,10 +46,6 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) static unsigned short normal_i2c[] = { 0x34 >> 1, 0x36 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; #endif diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index fdb9f55f1..e7a2e0449 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -43,10 +43,6 @@ MODULE_LICENSE("GPL"); static unsigned short normal_i2c[] = { 0x36 >> 1, I2C_CLIENT_END }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 13) -static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; -#endif - I2C_CLIENT_INSMOD; diff --git a/linux/include/media/pwc-ioctl.h b/linux/include/media/pwc-ioctl.h index 6e32ef4e2..0f19779c4 100644 --- a/linux/include/media/pwc-ioctl.h +++ b/linux/include/media/pwc-ioctl.h @@ -55,12 +55,7 @@ #include <linux/types.h> #include <linux/version.h> -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 10) -/* Compatibility for older kernel */ -typedef __u16 __le16; -#endif - - /* Enumeration of image sizes */ +/* Enumeration of image sizes */ #define PSZ_SQCIF 0x00 #define PSZ_QSIF 0x01 #define PSZ_QCIF 0x02 diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h index 178989285..fb356eb57 100644 --- a/linux/include/media/v4l2-dev.h +++ b/linux/include/media/v4l2-dev.h @@ -96,11 +96,7 @@ struct video_device #endif /* sysfs */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) struct device class_dev; /* v4l device */ -#else - struct class_device class_dev; -#endif struct device *dev; /* device parent */ /* device info */ @@ -396,13 +392,8 @@ extern int video_usercopy(struct inode *inode, struct file *file, #include <linux/mm.h> static inline int __must_check -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -video_device_create_file(struct video_device *vfd, - struct class_device_attribute *attr) -#else video_device_create_file(struct video_device *vfd, struct device_attribute *attr) -#endif { int ret = device_create_file(&vfd->class_dev, attr); if (ret < 0) diff --git a/linux/include/media/videobuf-dvb.h b/linux/include/media/videobuf-dvb.h index 14438bc98..84886be5e 100644 --- a/linux/include/media/videobuf-dvb.h +++ b/linux/include/media/videobuf-dvb.h @@ -20,11 +20,7 @@ struct videobuf_dvb { int nfeeds; /* videobuf_dvb_(un)register manges this */ -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,12)) struct dvb_adapter adapter; -#else - struct dvb_adapter *adapter; -#endif struct dvb_demux demux; struct dmxdev dmxdev; struct dmx_frontend fe_hw; diff --git a/linux/sound/pci/bt87x.c b/linux/sound/pci/bt87x.c index 7e6f22041..f9775c090 100644 --- a/linux/sound/pci/bt87x.c +++ b/linux/sound/pci/bt87x.c @@ -37,10 +37,6 @@ #include <sound/control.h> #include <sound/initval.h> #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) -/* From linux/pch_ids.h, appeared in 2.6.14 */ -#define PCI_DEVICE_ID_BROOKTREE_879 0x0879 -#endif #ifdef COMPAT_SND_CTL_BOOLEAN_MONO static int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) diff --git a/v4l/compat.h b/v4l/compat.h index ecfb51a2f..b59d0ed04 100644 --- a/v4l/compat.h +++ b/v4l/compat.h @@ -31,43 +31,14 @@ #define cancel_delayed_work_sync cancel_rearming_delayed_work #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -# define DEVICE_ATTR(a,b,c,d) CLASS_DEVICE_ATTR(a,b,c,d) -# define device_create_file(a,b) class_device_create_file(a,b) -# define device_remove_file(a,b) class_device_remove_file(a,b) -# define device_register(a) class_device_register(a) -# define device_unregister(a) class_device_unregister(a) -#endif - #ifndef __pure # define __pure __attribute__((pure)) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,11) -# define pm_message_t u32 -# define pci_choose_state(pci_dev, state) (state) -# define PCI_D0 (0) -# define assert_spin_locked(foobar) -#endif - #ifndef I2C_M_IGNORE_NAK # define I2C_M_IGNORE_NAK 0x1000 #endif -/* v4l-dvb uses an out of kernel copy of i2c-id.h, which does not have - some stuff that previous versions of i2c-id.h defined. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(LINUX_I2C_ID_H) -# define I2C_ALGO_BIT 0x010000 -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) -# define KEY_SEND 231 -# define KEY_REPLY 232 -# define KEY_FORWARDMAIL 233 -# define KEY_SAVE 234 -# define KEY_DOCUMENTS 235 -#endif - /* vm_insert_page() was added in 2.6.15 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_MM_H) static inline int vm_insert_page(struct vm_area_struct *vma, @@ -78,29 +49,7 @@ static inline int vm_insert_page(struct vm_area_struct *vma, } #endif -/* try_to_freeze() lost its argument. Must appear after linux/sched.h */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(_LINUX_SCHED_H) -# define try_to_freeze() try_to_freeze(PF_FREEZE) -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) -#ifndef kzalloc -#define kzalloc(size, flags) \ -({ \ - void *__ret = kmalloc(size, flags); \ - if (__ret) \ - memset(__ret, 0, size); \ - __ret; \ -}) -#endif -#endif - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -# define class_device_create(a, b, c, d, e, f, g, h) class_simple_device_add(a, c, d, e, f, g, h) -# define class_device_destroy(a, b) class_simple_device_remove(b) -# define class_create(a, b) class_simple_create(a, b) -# define class_destroy(a) class_simple_destroy(a) -#elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) # define class_device_create(a, b, c, d, e, f, g, h) class_device_create(a, c, d, e, f, g, h) #endif /* device_create/destroy added in 2.6.18 */ @@ -128,15 +77,6 @@ static inline int vm_insert_page(struct vm_area_struct *vma, #define mutex_trylock(a) down_trylock(a) #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(_LINUX_SCHED_H) -static inline signed long __sched -schedule_timeout_interruptible(signed long timeout) -{ - __set_current_state(TASK_INTERRUPTIBLE); - return schedule_timeout(timeout); -} -#endif - /* New 4GB DMA zone was added in 2.6.15-rc2 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) # define __GFP_DMA32 __GFP_DMA @@ -160,25 +100,6 @@ static inline void setup_timer(struct timer_list * timer, #define IRQF_DISABLED SA_INTERRUPT #endif -/* linux/usb.h must be included _before_ compat.h for this code to get - turned on. We can not just include usb.h here, because there is a - lot of code which will not compile if it has usb.h included, due to - conflicts with symbol names. */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \ - defined(__LINUX_USB_H) && defined(_INPUT_H) -#include <linux/input.h> -/* Found in linux/usb_input.h in 2.6.13 */ -/* Moved to linux/usb/input.h in 2.6.18 */ -static inline void -usb_to_input_id(const struct usb_device *dev, struct input_id *id) -{ - id->bustype = BUS_USB; - id->vendor = le16_to_cpu(dev->descriptor.idVendor); - id->product = le16_to_cpu(dev->descriptor.idProduct); - id->version = le16_to_cpu(dev->descriptor.bcdDevice); -} -#endif - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # define PCIAGP_FAIL 0 @@ -206,11 +127,6 @@ typedef int bool; #define SONY_PIC_COMMAND_SETCAMERA SONYPI_COMMAND_SETCAMERA #endif -/* Parameter to pci_match_device() changed in 2.6.13-rc2 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(LINUX_PCI_H) -#define pci_match_device(drv, dev) pci_match_device((drv)->id_table, dev) -#endif - /* pci_dev got a new revision field in 2.6.23-rc1 */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,23) && defined(LINUX_PCI_H) /* Just make it easier to subsitute pci_dev->revision with diff --git a/v4l_experimental/dpl3518.c b/v4l_experimental/dpl3518.c index 76a90be6b..a9ee6bd52 100644 --- a/v4l_experimental/dpl3518.c +++ b/v4l_experimental/dpl3518.c @@ -55,9 +55,7 @@ static unsigned short normal_i2c[] = { I2C_DPL3518 >> 1, I2C_CLIENT_END}; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) -static unsigned short normal_i2c_range[] = {I2C_CLIENT_END}; -#endif + I2C_CLIENT_INSMOD; struct dpl3518 { |