From 77446f6b7a8370db33dc921507935a514d4261db Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Sun, 6 Jul 2008 15:36:52 -0400 Subject: cx18: Add missing reset recovery delay in cx18-i2c.c From: Andy Walls cx18: Add a missing reset recovery delay in cx18-i2c.c after the final deassert. Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-i2c.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/cx18/cx18-i2c.c b/linux/drivers/media/video/cx18/cx18-i2c.c index 5b8550e0e..f6b7289db 100644 --- a/linux/drivers/media/video/cx18/cx18-i2c.c +++ b/linux/drivers/media/video/cx18/cx18-i2c.c @@ -439,6 +439,7 @@ int init_cx18_i2c(struct cx18 *cx) write_reg_sync(0x00c000c0, 0xc7001c); mdelay(10); write_reg_sync(0x00c00000, 0xc7001c); + mdelay(10); write_reg_sync(0x00c00000, 0xc730c8); /* Set to edge-triggered intrs. */ write_reg_sync(0x00c00000, 0xc730c4); /* Clear any stale intrs */ -- cgit v1.2.3 From 865f39c35bb37e04e5c526900ee8f0e8d671460b Mon Sep 17 00:00:00 2001 From: Andy Walls Date: Mon, 7 Jul 2008 06:36:16 -0400 Subject: cx18: Use correct GPIO pin for resetting Xceive 3028 tuner on Yuan MPC718 From: Andy Walls Change the Yuan MPC718 cards entry to use the correct GPIO pin for resetting the Xceive 3028 tuner. Thanks to Brian Hope for taking the time and figuring out which pin to use. Signed-off-by: Andy Walls --- linux/drivers/media/video/cx18/cx18-cards.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/cx18/cx18-cards.c b/linux/drivers/media/video/cx18/cx18-cards.c index bb45bcf68..0caae1a5e 100644 --- a/linux/drivers/media/video/cx18/cx18-cards.c +++ b/linux/drivers/media/video/cx18/cx18-cards.c @@ -196,7 +196,7 @@ static const struct cx18_card_pci_info cx18_pci_mpc718[] = { static const struct cx18_card cx18_card_mpc718 = { .type = CX18_CARD_YUAN_MPC718, .name = "Yuan MPC718", - .comment = "Some Composite and S-Video inputs are currently working.\n", + .comment = "Analog video capture works; some audio line in may not.\n", .v4l2_capabilities = CX18_CAP_ENCODER, .hw_audio_ctrl = CX18_HW_CX23418, .hw_all = CX18_HW_TUNER, @@ -229,7 +229,7 @@ static const struct cx18_card cx18_card_mpc718 = { .tune_lane = 0, .initial_emrs = 2, }, - .xceive_pin = 15, + .xceive_pin = 0, .pci_list = cx18_pci_mpc718, .i2c = &cx18_i2c_std, }; -- cgit v1.2.3 From e012707cc3ef84b0975d95bf66576a6d3180b1ba Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 4 Jul 2008 00:34:59 +0000 Subject: uvcvideo: Fix a buffer overflow in format descriptor parsing From: Laurent Pinchart Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/uvc/uvc_driver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/uvc/uvc_driver.c b/linux/drivers/media/video/uvc/uvc_driver.c index e7b469ca5..31a0e706a 100644 --- a/linux/drivers/media/video/uvc/uvc_driver.c +++ b/linux/drivers/media/video/uvc/uvc_driver.c @@ -298,7 +298,8 @@ static int uvc_parse_format(struct uvc_device *dev, switch (buffer[2]) { case VS_FORMAT_UNCOMPRESSED: case VS_FORMAT_FRAME_BASED: - if (buflen < 27) { + n = buffer[2] == VS_FORMAT_UNCOMPRESSED ? 27 : 28; + if (buflen < n) { uvc_trace(UVC_TRACE_DESCR, "device %d videostreaming" "interface %d FORMAT error\n", dev->udev->devnum, -- cgit v1.2.3 From 16d031d69e6925f4645d87d1d2994d6011045a96 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 4 Jul 2008 00:35:26 +0000 Subject: uvcvideo: Use GFP_NOIO when allocating memory during resume From: Laurent Pinchart The swap device might still be asleep, so memory allocated in the resume handler must use GFP_NOIO. Thanks to Oliver Neukum for catching and reporting this bug. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/uvc/uvc_status.c | 2 +- linux/drivers/media/video/uvc/uvc_video.c | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/uvc/uvc_status.c b/linux/drivers/media/video/uvc/uvc_status.c index f401c44bd..7bfddad37 100644 --- a/linux/drivers/media/video/uvc/uvc_status.c +++ b/linux/drivers/media/video/uvc/uvc_status.c @@ -203,6 +203,6 @@ int uvc_status_resume(struct uvc_device *dev) if (dev->int_urb == NULL) return 0; - return usb_submit_urb(dev->int_urb, GFP_KERNEL); + return usb_submit_urb(dev->int_urb, GFP_NOIO); } diff --git a/linux/drivers/media/video/uvc/uvc_video.c b/linux/drivers/media/video/uvc/uvc_video.c index 83600f259..dcb3570aa 100644 --- a/linux/drivers/media/video/uvc/uvc_video.c +++ b/linux/drivers/media/video/uvc/uvc_video.c @@ -586,7 +586,7 @@ static void uvc_uninit_video(struct uvc_video_device *video) * is given by the endpoint. */ static int uvc_init_video_isoc(struct uvc_video_device *video, - struct usb_host_endpoint *ep) + struct usb_host_endpoint *ep, gfp_t gfp_flags) { struct urb *urb; unsigned int npackets, i, j; @@ -611,14 +611,14 @@ static int uvc_init_video_isoc(struct uvc_video_device *video, size = npackets * psize; for (i = 0; i < UVC_URBS; ++i) { - urb = usb_alloc_urb(npackets, GFP_KERNEL); + urb = usb_alloc_urb(npackets, gfp_flags); if (urb == NULL) { uvc_uninit_video(video); return -ENOMEM; } video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev, - size, GFP_KERNEL, &urb->transfer_dma); + size, gfp_flags, &urb->transfer_dma); if (video->urb_buffer[i] == NULL) { usb_free_urb(urb); uvc_uninit_video(video); @@ -652,7 +652,7 @@ static int uvc_init_video_isoc(struct uvc_video_device *video, * given by the endpoint. */ static int uvc_init_video_bulk(struct uvc_video_device *video, - struct usb_host_endpoint *ep) + struct usb_host_endpoint *ep, gfp_t gfp_flags) { struct urb *urb; unsigned int pipe, i; @@ -674,14 +674,14 @@ static int uvc_init_video_bulk(struct uvc_video_device *video, pipe = usb_rcvbulkpipe(video->dev->udev, ep->desc.bEndpointAddress); for (i = 0; i < UVC_URBS; ++i) { - urb = usb_alloc_urb(0, GFP_KERNEL); + urb = usb_alloc_urb(0, gfp_flags); if (urb == NULL) { uvc_uninit_video(video); return -ENOMEM; } video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev, - size, GFP_KERNEL, &urb->transfer_dma); + size, gfp_flags, &urb->transfer_dma); if (video->urb_buffer[i] == NULL) { usb_free_urb(urb); uvc_uninit_video(video); @@ -702,7 +702,7 @@ static int uvc_init_video_bulk(struct uvc_video_device *video, /* * Initialize isochronous/bulk URBs and allocate transfer buffers. */ -static int uvc_init_video(struct uvc_video_device *video) +static int uvc_init_video(struct uvc_video_device *video, gfp_t gfp_flags) { struct usb_interface *intf = video->streaming->intf; struct usb_host_interface *alts; @@ -747,7 +747,7 @@ static int uvc_init_video(struct uvc_video_device *video) if ((ret = usb_set_interface(video->dev->udev, intfnum, i)) < 0) return ret; - ret = uvc_init_video_isoc(video, ep); + ret = uvc_init_video_isoc(video, ep, gfp_flags); } else { /* Bulk endpoint, proceed to URB initialization. */ ep = uvc_find_endpoint(&intf->altsetting[0], @@ -755,7 +755,7 @@ static int uvc_init_video(struct uvc_video_device *video) if (ep == NULL) return -EIO; - ret = uvc_init_video_bulk(video, ep); + ret = uvc_init_video_bulk(video, ep, gfp_flags); } if (ret < 0) @@ -763,7 +763,7 @@ static int uvc_init_video(struct uvc_video_device *video) /* Submit the URBs. */ for (i = 0; i < UVC_URBS; ++i) { - if ((ret = usb_submit_urb(video->urb[i], GFP_KERNEL)) < 0) { + if ((ret = usb_submit_urb(video->urb[i], gfp_flags)) < 0) { uvc_printk(KERN_ERR, "Failed to submit URB %u " "(%d).\n", i, ret); uvc_uninit_video(video); @@ -818,7 +818,7 @@ int uvc_video_resume(struct uvc_video_device *video) if (!uvc_queue_streaming(&video->queue)) return 0; - if ((ret = uvc_init_video(video)) < 0) + if ((ret = uvc_init_video(video, GFP_NOIO)) < 0) uvc_queue_enable(&video->queue, 0); return ret; @@ -930,6 +930,6 @@ int uvc_video_enable(struct uvc_video_device *video, int enable) if ((ret = uvc_queue_enable(&video->queue, 1)) < 0) return ret; - return uvc_init_video(video); + return uvc_init_video(video, GFP_KERNEL); } -- cgit v1.2.3 From 64a2df85368a26eafb15272ae2ba0fc556fbae21 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Fri, 4 Jul 2008 00:36:21 +0000 Subject: uvcvideo: Don't free URB buffers on suspend. From: Laurent Pinchart All submitted URBs must be killed at suspend time, but URB buffers don't have to be freed. Avoiding a free on suspend/reallocate on resume lowers the presure on system memory. Signed-off-by: Laurent Pinchart Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/uvc/uvc_video.c | 96 ++++++++++++++++++++----------- linux/drivers/media/video/uvc/uvcvideo.h | 2 + 2 files changed, 66 insertions(+), 32 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/uvc/uvc_video.c b/linux/drivers/media/video/uvc/uvc_video.c index dcb3570aa..ad63794fd 100644 --- a/linux/drivers/media/video/uvc/uvc_video.c +++ b/linux/drivers/media/video/uvc/uvc_video.c @@ -553,10 +553,57 @@ static void uvc_video_complete(struct urb *urb) } } +/* + * Free transfer buffers. + */ +static void uvc_free_urb_buffers(struct uvc_video_device *video) +{ + unsigned int i; + + for (i = 0; i < UVC_URBS; ++i) { + if (video->urb_buffer[i]) { + usb_buffer_free(video->dev->udev, video->urb_size, + video->urb_buffer[i], video->urb_dma[i]); + video->urb_buffer[i] = NULL; + } + } + + video->urb_size = 0; +} + +/* + * Allocate transfer buffers. This function can be called with buffers + * already allocated when resuming from suspend, in which case it will + * return without touching the buffers. + * + * Return 0 on success or -ENOMEM when out of memory. + */ +static int uvc_alloc_urb_buffers(struct uvc_video_device *video, + unsigned int size) +{ + unsigned int i; + + /* Buffers are already allocated, bail out. */ + if (video->urb_size) + return 0; + + for (i = 0; i < UVC_URBS; ++i) { + video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev, + size, GFP_KERNEL, &video->urb_dma[i]); + if (video->urb_buffer[i] == NULL) { + uvc_free_urb_buffers(video); + return -ENOMEM; + } + } + + video->urb_size = size; + return 0; +} + /* * Uninitialize isochronous/bulk URBs and free transfer buffers. */ -static void uvc_uninit_video(struct uvc_video_device *video) +static void uvc_uninit_video(struct uvc_video_device *video, int free_buffers) { struct urb *urb; unsigned int i; @@ -566,19 +613,12 @@ static void uvc_uninit_video(struct uvc_video_device *video) continue; usb_kill_urb(urb); - /* urb->transfer_buffer_length is not touched by USB core, so - * we can use it here as the buffer length. - */ - if (video->urb_buffer[i]) { - usb_buffer_free(video->dev->udev, - urb->transfer_buffer_length, - video->urb_buffer[i], urb->transfer_dma); - video->urb_buffer[i] = NULL; - } - usb_free_urb(urb); video->urb[i] = NULL; } + + if (free_buffers) + uvc_free_urb_buffers(video); } /* @@ -610,18 +650,13 @@ static int uvc_init_video_isoc(struct uvc_video_device *video, size = npackets * psize; + if (uvc_alloc_urb_buffers(video, size) < 0) + return -ENOMEM; + for (i = 0; i < UVC_URBS; ++i) { urb = usb_alloc_urb(npackets, gfp_flags); if (urb == NULL) { - uvc_uninit_video(video); - return -ENOMEM; - } - - video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev, - size, gfp_flags, &urb->transfer_dma); - if (video->urb_buffer[i] == NULL) { - usb_free_urb(urb); - uvc_uninit_video(video); + uvc_uninit_video(video, 1); return -ENOMEM; } @@ -632,6 +667,7 @@ static int uvc_init_video_isoc(struct uvc_video_device *video, urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP; urb->interval = ep->desc.bInterval; urb->transfer_buffer = video->urb_buffer[i]; + urb->transfer_dma = video->urb_dma[i]; urb->complete = uvc_video_complete; urb->number_of_packets = npackets; urb->transfer_buffer_length = size; @@ -671,20 +707,15 @@ static int uvc_init_video_bulk(struct uvc_video_device *video, if (size > psize * UVC_MAX_ISO_PACKETS) size = psize * UVC_MAX_ISO_PACKETS; + if (uvc_alloc_urb_buffers(video, size) < 0) + return -ENOMEM; + pipe = usb_rcvbulkpipe(video->dev->udev, ep->desc.bEndpointAddress); for (i = 0; i < UVC_URBS; ++i) { urb = usb_alloc_urb(0, gfp_flags); if (urb == NULL) { - uvc_uninit_video(video); - return -ENOMEM; - } - - video->urb_buffer[i] = usb_buffer_alloc(video->dev->udev, - size, gfp_flags, &urb->transfer_dma); - if (video->urb_buffer[i] == NULL) { - usb_free_urb(urb); - uvc_uninit_video(video); + uvc_uninit_video(video, 1); return -ENOMEM; } @@ -692,6 +723,7 @@ static int uvc_init_video_bulk(struct uvc_video_device *video, video->urb_buffer[i], size, uvc_video_complete, video); urb->transfer_flags = URB_NO_TRANSFER_DMA_MAP; + urb->transfer_dma = video->urb_dma[i]; video->urb[i] = urb; } @@ -766,7 +798,7 @@ static int uvc_init_video(struct uvc_video_device *video, gfp_t gfp_flags) if ((ret = usb_submit_urb(video->urb[i], gfp_flags)) < 0) { uvc_printk(KERN_ERR, "Failed to submit URB %u " "(%d).\n", i, ret); - uvc_uninit_video(video); + uvc_uninit_video(video, 1); return ret; } } @@ -791,7 +823,7 @@ int uvc_video_suspend(struct uvc_video_device *video) return 0; video->frozen = 1; - uvc_uninit_video(video); + uvc_uninit_video(video, 0); usb_set_interface(video->dev->udev, video->streaming->intfnum, 0); return 0; } @@ -920,7 +952,7 @@ int uvc_video_enable(struct uvc_video_device *video, int enable) int ret; if (!enable) { - uvc_uninit_video(video); + uvc_uninit_video(video, 1); usb_set_interface(video->dev->udev, video->streaming->intfnum, 0); uvc_queue_enable(&video->queue, 0); diff --git a/linux/drivers/media/video/uvc/uvcvideo.h b/linux/drivers/media/video/uvc/uvcvideo.h index 605a6ccb1..bafe3406e 100644 --- a/linux/drivers/media/video/uvc/uvcvideo.h +++ b/linux/drivers/media/video/uvc/uvcvideo.h @@ -602,6 +602,8 @@ struct uvc_video_device { struct urb *urb[UVC_URBS]; char *urb_buffer[UVC_URBS]; + dma_addr_t urb_dma[UVC_URBS]; + unsigned int urb_size; __u8 last_fid; }; -- cgit v1.2.3 From 7ce87336c2f386ab6c35e985a5832d21b5cd7fab Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 00:19:19 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.0 From: Hans Verkuil First phase of the backwards compatibility cleanup: stop supporting kernels older than 2.6.0. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/au0828/au0828-i2c.c | 2 - linux/drivers/media/video/bt8xx/bt832.c | 21 +-- linux/drivers/media/video/bt8xx/bttv-cards.c | 13 -- linux/drivers/media/video/bt8xx/bttv-driver.c | 26 --- linux/drivers/media/video/bt8xx/bttv-i2c.c | 4 - linux/drivers/media/video/bt8xx/bttv-input.c | 2 - linux/drivers/media/video/bt8xx/bttv.h | 10 -- linux/drivers/media/video/bt8xx/bttvp.h | 10 -- linux/drivers/media/video/cs5345.c | 8 - linux/drivers/media/video/cs53l32a.c | 12 -- linux/drivers/media/video/cx2341x.c | 3 - linux/drivers/media/video/cx23885/cx23885-i2c.c | 2 - linux/drivers/media/video/cx23885/cx23885-video.c | 10 -- linux/drivers/media/video/cx25840/cx25840-audio.c | 3 - linux/drivers/media/video/cx25840/cx25840-core.c | 7 - .../drivers/media/video/cx25840/cx25840-firmware.c | 8 - linux/drivers/media/video/cx88/cx88-blackbird.c | 7 - linux/drivers/media/video/cx88/cx88-cards.c | 6 - linux/drivers/media/video/cx88/cx88-core.c | 2 - linux/drivers/media/video/cx88/cx88-i2c.c | 7 - linux/drivers/media/video/cx88/cx88-input.c | 4 - linux/drivers/media/video/cx88/cx88-mpeg.c | 10 -- linux/drivers/media/video/cx88/cx88-tvaudio.c | 2 - linux/drivers/media/video/cx88/cx88-video.c | 16 -- linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | 8 - linux/drivers/media/video/em28xx/em28xx-video.c | 16 -- linux/drivers/media/video/ir-kbd-i2c.c | 4 +- linux/drivers/media/video/m52790.c | 8 - linux/drivers/media/video/msp3400-driver.c | 63 -------- linux/drivers/media/video/msp3400-driver.h | 4 - linux/drivers/media/video/msp3400-kthreads.c | 45 ------ linux/drivers/media/video/pwc/pwc-ctrl.c | 21 --- linux/drivers/media/video/saa6588.c | 17 +- linux/drivers/media/video/saa7115.c | 11 -- linux/drivers/media/video/saa7127.c | 12 -- linux/drivers/media/video/saa7134/saa6752hs.c | 14 +- linux/drivers/media/video/saa7134/saa7134-core.c | 25 --- .../drivers/media/video/saa7134/saa7134-empress.c | 6 - linux/drivers/media/video/saa7134/saa7134-i2c.c | 4 - linux/drivers/media/video/saa7134/saa7134-input.c | 2 - .../drivers/media/video/saa7134/saa7134-tvaudio.c | 16 -- linux/drivers/media/video/saa7134/saa7134.h | 6 - linux/drivers/media/video/saa717x.c | 7 - linux/drivers/media/video/tda7432.c | 19 +-- linux/drivers/media/video/tda9840.c | 4 +- linux/drivers/media/video/tda9875.c | 20 +-- linux/drivers/media/video/tea6415c.c | 4 +- linux/drivers/media/video/tea6420.c | 4 +- linux/drivers/media/video/tlv320aic23b.c | 7 - linux/drivers/media/video/tuner-core.c | 19 --- linux/drivers/media/video/tvaudio.c | 6 - linux/drivers/media/video/tveeprom.c | 3 - linux/drivers/media/video/tvmixer.c | 28 +--- linux/drivers/media/video/tvp5150.c | 16 +- linux/drivers/media/video/upd64031a.c | 7 - linux/drivers/media/video/upd64083.c | 7 - .../drivers/media/video/usbvision/usbvision-core.c | 90 +---------- .../drivers/media/video/usbvision/usbvision-i2c.c | 3 - .../media/video/usbvision/usbvision-video.c | 177 +-------------------- linux/drivers/media/video/usbvision/usbvision.h | 4 - linux/drivers/media/video/v4l2-common.c | 3 - linux/drivers/media/video/videobuf-dma-sg.c | 4 - linux/drivers/media/video/vivi.c | 63 -------- linux/drivers/media/video/vp27smpx.c | 8 - linux/drivers/media/video/wm8739.c | 12 -- linux/drivers/media/video/wm8775.c | 8 - 66 files changed, 14 insertions(+), 986 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/au0828/au0828-i2c.c b/linux/drivers/media/video/au0828/au0828-i2c.c index b40a086e4..32858dceb 100644 --- a/linux/drivers/media/video/au0828/au0828-i2c.c +++ b/linux/drivers/media/video/au0828/au0828-i2c.c @@ -307,9 +307,7 @@ static struct i2c_algorithm au0828_i2c_algo_template = { static struct i2c_adapter au0828_i2c_adap_template = { .name = DRIVER_NAME, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) .owner = THIS_MODULE, -#endif .id = I2C_HW_B_AU0828, .algo = &au0828_i2c_algo_template, .class = I2C_CLASS_TV_ANALOG, diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c index 4eefaba8f..fc884c935 100644 --- a/linux/drivers/media/video/bt8xx/bt832.c +++ b/linux/drivers/media/video/bt8xx/bt832.c @@ -33,9 +33,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif #include "bttv.h" #include "bt832.h" @@ -50,11 +47,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; I2C_CLIENT_INSMOD; int debug; /* debug output */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, int, 0644); -#else -MODULE_PARM(debug, "i"); -#endif /* ---------------------------------------------------------------------- */ @@ -187,12 +180,7 @@ int bt832_init(struct i2c_client *i2c_client_s) -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int bt832_attach(struct i2c_adapter *adap, int addr, int kind) -#else -static int bt832_attach(struct i2c_adapter *adap, int addr, - unsigned short flags, int kind) -#endif { struct bt832 *t; @@ -207,10 +195,6 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, v4l_info(&t->client,"chip found @ 0x%x\n", addr<<1); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif if(! bt832_init(&t->client)) { bt832_detach(&t->client); return -1; @@ -238,9 +222,6 @@ static int bt832_detach(struct i2c_client *client) v4l_info(&t->client,"dettach\n"); i2c_detach_client(client); kfree(t); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } @@ -277,7 +258,7 @@ bt832_command(struct i2c_client *client, unsigned int cmd, void *arg) /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, #endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index 0e6771643..10a519642 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -115,14 +115,6 @@ module_param(gpiomask, int, 0444); module_param(audioall, int, 0444); module_param(autoload, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(card,"1-" __stringify(BTTV_MAX) "i"); -MODULE_PARM(pll,"1-" __stringify(BTTV_MAX) "i"); -MODULE_PARM(tuner,"1-" __stringify(BTTV_MAX) "i"); -MODULE_PARM(svhs,"1-" __stringify(BTTV_MAX) "i"); -MODULE_PARM(remote,"1-" __stringify(BTTV_MAX) "i"); -MODULE_PARM(audiomux,"1-" __stringify(BTTV_MAX) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static int dummy; module_param_array(card, int, dummy, 0444); @@ -139,7 +131,6 @@ module_param_array(svhs, int, NULL, 0444); module_param_array(remote, int, NULL, 0444); module_param_array(audiomux, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(triton1,"set ETBF pci config bit " "[enable bug compatibility for triton1 + others]"); @@ -3870,11 +3861,7 @@ static int __devinit pvr_boot(struct bttv *btv) const struct firmware *fw_entry; int rc; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); -#else - rc = request_firmware(&fw_entry, "hcwamc.rbf", pci_name(btv->c.pci)); -#endif if (rc != 0) { printk(KERN_WARNING "bttv%d: no altera firmware [via hotplug]\n", btv->c.nr); diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 15f10b88a..33db080bb 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -48,9 +48,7 @@ #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include -#endif #include #include @@ -132,16 +130,12 @@ 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,7 +165,6 @@ 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) @@ -184,7 +177,6 @@ static ssize_t show_card(struct class_device *cd, char *buf) 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 +190,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 +199,6 @@ static void request_modules(struct bttv *dev) #endif schedule_work(&dev->request_module_wk); } -#endif #else #define request_modules(dev) #endif /* CONFIG_MODULES */ @@ -4115,10 +4103,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 +4142,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 +4222,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)", @@ -4509,13 +4491,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 +4534,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); @@ -4722,13 +4700,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 +4715,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); diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index 746b9dd77..e0c52aa27 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -33,9 +33,7 @@ #include "bttvp.h" #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include -#endif #include static int attach_inform(struct i2c_client *client); @@ -428,9 +426,7 @@ int __devinit init_bttv_i2c(struct bttv *btv) #endif btv->c.i2c_adap.client_register = attach_inform; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66) btv->c.i2c_adap.dev.parent = &btv->c.pci->dev; -#endif snprintf(btv->c.i2c_adap.name, sizeof(btv->c.i2c_adap.name), "bt%d #%d [%s]", btv->id, btv->c.nr, btv->use_i2c_hw ? "hw" : "sw"); diff --git a/linux/drivers/media/video/bt8xx/bttv-input.c b/linux/drivers/media/video/bt8xx/bttv-input.c index f82213990..ada104826 100644 --- a/linux/drivers/media/video/bt8xx/bttv-input.c +++ b/linux/drivers/media/video/bt8xx/bttv-input.c @@ -313,7 +313,6 @@ int bttv_input_init(struct bttv *btv) ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); input_dev->name = ir->name; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) input_dev->phys = ir->phys; input_dev->id.bustype = BUS_PCI; input_dev->id.version = 1; @@ -332,7 +331,6 @@ int bttv_input_init(struct bttv *btv) #else input_dev->dev = &btv->c.pci->dev; #endif -#endif #endif btv->remote = ir; diff --git a/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h index 4c73aacdb..dab61e62e 100644 --- a/linux/drivers/media/video/bt8xx/bttv.h +++ b/linux/drivers/media/video/bt8xx/bttv.h @@ -302,8 +302,6 @@ extern int bttv_write_gpio(unsigned int card, /* ---------------------------------------------------------- */ /* sysfs/driver-moded based gpio access interface */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - struct bttv_sub_device { struct device dev; struct bttv_core *core; @@ -335,14 +333,6 @@ void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits); #define gpio_write(value) bttv_gpio_write(&btv->c, value) #define gpio_bits(mask,bits) bttv_gpio_bits(&btv->c, mask, bits) -#else - -#define gpio_inout(mask,bits) btaor((mask)&(bits),~(mask),BT848_GPIO_OUT_EN) -#define gpio_read() btread(BT848_GPIO_DATA) -#define gpio_write(value) btwrite((value),BT848_GPIO_DATA) -#define gpio_bits(mask,bits) btaor((mask)&(bits),~(mask),BT848_GPIO_DATA) - -#endif /* ---------------------------------------------------------- */ /* i2c */ diff --git a/linux/drivers/media/video/bt8xx/bttvp.h b/linux/drivers/media/video/bt8xx/bttvp.h index 9fd8eeddf..96679f533 100644 --- a/linux/drivers/media/video/bt8xx/bttvp.h +++ b/linux/drivers/media/video/bt8xx/bttvp.h @@ -42,13 +42,7 @@ #include #include "compat.h" #include - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#define strlcpy(dest,src,len) strncpy(dest,src,(len)-1) -#else #include -#endif #include #include #include @@ -272,14 +266,10 @@ extern struct videobuf_queue_ops bttv_vbi_qops; /* ---------------------------------------------------------- */ /* bttv-gpio.c */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - extern struct bus_type bttv_sub_bus_type; int bttv_sub_add_device(struct bttv_core *core, char *name); int bttv_sub_del_devices(struct bttv_core *core); -#endif - /* ---------------------------------------------------------- */ /* bttv-driver.c */ diff --git a/linux/drivers/media/video/cs5345.c b/linux/drivers/media/video/cs5345.c index d0bdc009d..c33e420bd 100644 --- a/linux/drivers/media/video/cs5345.c +++ b/linux/drivers/media/video/cs5345.c @@ -34,11 +34,7 @@ MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, bool, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On"); @@ -191,7 +187,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = cs5345_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c index 7c0761e21..ebab280a0 100644 --- a/linux/drivers/media/video/cs53l32a.c +++ b/linux/drivers/media/video/cs53l32a.c @@ -30,10 +30,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC"); @@ -42,11 +38,7 @@ MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, bool, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On"); @@ -209,7 +201,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = cs53l32a_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c index 76b2f8c62..3f2191162 100644 --- a/linux/drivers/media/video/cx2341x.c +++ b/linux/drivers/media/video/cx2341x.c @@ -25,9 +25,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include -#endif #include #include diff --git a/linux/drivers/media/video/cx23885/cx23885-i2c.c b/linux/drivers/media/video/cx23885/cx23885-i2c.c index ba8e27ca9..f0ee47256 100644 --- a/linux/drivers/media/video/cx23885/cx23885-i2c.c +++ b/linux/drivers/media/video/cx23885/cx23885-i2c.c @@ -359,9 +359,7 @@ static struct i2c_algorithm cx23885_i2c_algo_template = { static struct i2c_adapter cx23885_i2c_adap_template = { .name = "cx23885", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .owner = THIS_MODULE, -#endif .id = I2C_HW_B_CX23885, .algo = &cx23885_i2c_algo_template, .class = I2C_CLASS_TV_ANALOG, diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index fdbcd53ab..1e1588bee 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -29,9 +29,7 @@ #include #include #include "compat.h" -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) #include -#endif #include #include "cx23885.h" @@ -52,11 +50,6 @@ static unsigned int video_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -MODULE_PARM(video_nr, "1-" __stringify(CX23885_MAXBOARDS) "i"); -MODULE_PARM(vbi_nr, "1-" __stringify(CX23885_MAXBOARDS) "i"); -MODULE_PARM(radio_nr, "1-" __stringify(CX23885_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) static unsigned int dummy; module_param_array(video_nr, int, dummy, 0444); @@ -67,7 +60,6 @@ module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); @@ -376,10 +368,8 @@ struct video_device *cx23885_vdev_init(struct cx23885_dev *dev, return NULL; *vfd = *template; vfd->minor = -1; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) vfd->dev = &pci->dev; vfd->release = video_device_release; -#endif snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name, type, cx23885_boards[dev->board].name); return vfd; diff --git a/linux/drivers/media/video/cx25840/cx25840-audio.c b/linux/drivers/media/video/cx25840/cx25840-audio.c index eda48b596..8e134312c 100644 --- a/linux/drivers/media/video/cx25840/cx25840-audio.c +++ b/linux/drivers/media/video/cx25840/cx25840-audio.c @@ -21,9 +21,6 @@ #include #include #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif #include "cx25840-core.h" diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c index ca5cc0f51..98a73e8e0 100644 --- a/linux/drivers/media/video/cx25840/cx25840-core.c +++ b/linux/drivers/media/video/cx25840/cx25840-core.c @@ -42,9 +42,6 @@ #include #include #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif #include "cx25840-core.h" @@ -60,11 +57,7 @@ static unsigned short normal_i2c_range[] = { I2C_CLIENT_END }; int cx25840_debug; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) module_param_named(debug,cx25840_debug, int, 0644); -#else -MODULE_PARM(cx25840_debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debugging messages [0=Off (default) 1=On]"); diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c index d283ef2d1..95b84ce21 100644 --- a/linux/drivers/media/video/cx25840/cx25840-firmware.c +++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c @@ -38,19 +38,11 @@ */ #define FWSEND 48 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #define FWDEV(x) &((x)->dev) -#else -#define FWDEV(x) (x)->name -#endif static char *firmware = FWFILE; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) module_param(firmware, charp, 0444); -#else -MODULE_PARM(firmware, "s"); -#endif MODULE_PARM_DESC(firmware, "Firmware image [default: " FWFILE "]"); diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index a642d3dc8..83638557d 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -30,9 +30,7 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #include -#endif #include #include #include @@ -444,13 +442,8 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) if (retval < 0) dprintk(0, "Error with register_write\n"); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME, &dev->pci->dev); -#else - retval = request_firmware(&firmware, CX2341X_FIRM_ENC_FILENAME, - pci_name(dev->pci)); -#endif if (retval != 0) { diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index 1fb39e08e..e8932ddf1 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -33,11 +33,6 @@ static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(tuner,"1-" __stringify(CX88_MAXBOARDS) "i"); -MODULE_PARM(radiox,"1-" __stringify(CX88_MAXBOARDS) "i"); -MODULE_PARM(card,"1-" __stringify(CX88_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static int dummy; module_param_array(tuner, int, dummy, 0444); @@ -48,7 +43,6 @@ module_param_array(tuner, int, NULL, 0444); module_param_array(radio, int, NULL, 0444); module_param_array(card, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(tuner,"tuner type"); MODULE_PARM_DESC(radio,"radio tuner type"); diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index 5d6265c1d..6efb1c61a 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1037,10 +1037,8 @@ struct video_device *cx88_vdev_init(struct cx88_core *core, return NULL; *vfd = *template; vfd->minor = -1; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) vfd->dev = &pci->dev; vfd->release = video_device_release; -#endif snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", core->name, type, core->board.name); return vfd; diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 800ea0d64..0f8ca620b 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -34,9 +34,6 @@ #include "cx88.h" #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif static unsigned int i2c_debug; module_param(i2c_debug, int, 0644); @@ -196,13 +193,9 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66) core->i2c_adap.dev.parent = &pci->dev; -#endif strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) core->i2c_adap.owner = THIS_MODULE; -#endif core->i2c_adap.id = I2C_HW_B_CX2388x; core->i2c_adap.client_register = attach_inform; core->i2c_adap.client_unregister = detach_inform; diff --git a/linux/drivers/media/video/cx88/cx88-input.c b/linux/drivers/media/video/cx88/cx88-input.c index e334bd20a..4796e3ba1 100644 --- a/linux/drivers/media/video/cx88/cx88-input.c +++ b/linux/drivers/media/video/cx88/cx88-input.c @@ -349,7 +349,6 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); input_dev->name = ir->name; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) input_dev->phys = ir->phys; input_dev->id.bustype = BUS_PCI; input_dev->id.version = 1; @@ -368,7 +367,6 @@ int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci) #else input_dev->dev = &pci->dev; #endif -#endif #endif /* record handles to ourself */ ir->core = core; @@ -500,11 +498,9 @@ void cx88_ir_irq(struct cx88_core *core) /* ---------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) MODULE_AUTHOR("Gerd Knorr, Pavel Machek, Chris Pascoe"); MODULE_DESCRIPTION("input driver for cx88 GPIO-based IR remote controls"); MODULE_LICENSE("GPL"); -#endif /* * Local variables: * c-basic-offset: 8 diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index c8dba3dfa..b95f6804f 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -24,9 +24,7 @@ #include #include -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) #include -#endif #include #include #include @@ -36,13 +34,9 @@ /* ------------------------------------------------------------------ */ MODULE_DESCRIPTION("mpeg driver for cx2388x based TV cards"); -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) MODULE_AUTHOR("Jelle Foks "); MODULE_AUTHOR("Chris Pascoe "); MODULE_AUTHOR("Gerd Knorr [SuSE Labs]"); -#else -MODULE_AUTHOR("Jelle Foks ,Chris Pascoe ,Gerd Knorr [SuSE Labs]"); -#endif MODULE_LICENSE("GPL"); static unsigned int debug; @@ -72,9 +66,6 @@ static void request_module_async(struct work_struct *work) request_module("cx88-blackbird"); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#define request_modules(dev) -#else static void request_modules(struct cx8802_dev *dev) { #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) @@ -84,7 +75,6 @@ static void request_modules(struct cx8802_dev *dev) #endif schedule_work(&dev->request_module_wk); } -#endif #else #define request_modules(dev) #endif /* CONFIG_MODULES */ diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c index b4dab2647..5eb95dbbe 100644 --- a/linux/drivers/media/video/cx88/cx88-tvaudio.c +++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c @@ -53,9 +53,7 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) #include -#endif #include "cx88.h" diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index c9f7d0048..786800e1a 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -35,9 +35,7 @@ #include #include #include "compat.h" -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #include -#endif #include #include "cx88.h" @@ -58,11 +56,6 @@ static unsigned int video_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(video_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); -MODULE_PARM(vbi_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); -MODULE_PARM(radio_nr,"1-" __stringify(CX88_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static unsigned int dummy; module_param_array(video_nr, int, dummy, 0444); @@ -73,7 +66,6 @@ module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(video_nr,"video device numbers"); MODULE_PARM_DESC(vbi_nr,"vbi device numbers"); @@ -2221,7 +2213,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, mutex_unlock(&core->lock); /* start tvaudio thread */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) if (core->board.tuner_type != TUNER_ABSENT) { core->kthread = kthread_run(cx88_audio_thread, core, "cx88 tvaudio"); if (IS_ERR(core->kthread)) { @@ -2230,13 +2221,6 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev, core->name, err); } } -#else - /*FIXME: Not sure if this will work */ - if (core->board.tuner_type != TUNER_ABSENT) - kernel_thread (cx88_audio_thread, core, 0); - - core->kthread = NULL; -#endif return 0; fail_unreg: diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index 84bb59175..4dbe81282 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -30,10 +30,6 @@ #include "cx88.h" #include "cx88-vp3054-i2c.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif - MODULE_DESCRIPTION("driver for cx2388x VP3054 design"); MODULE_AUTHOR("Chris Pascoe "); MODULE_LICENSE("GPL"); @@ -128,14 +124,10 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL; #endif -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66) vp3054_i2c->adap.dev.parent = &dev->pci->dev; -#endif strlcpy(vp3054_i2c->adap.name, core->name, sizeof(vp3054_i2c->adap.name)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) vp3054_i2c->adap.owner = THIS_MODULE; -#endif vp3054_i2c->adap.id = I2C_HW_B_CX2388x; vp3054_i2c->algo.data = dev; i2c_set_adapdata(&vp3054_i2c->adap, dev); diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index f4479aeca..b3eb14501 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -42,9 +42,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#endif #define DRIVER_AUTHOR "Ludovico Cavedon , " \ "Markus Rechberger , " \ @@ -83,12 +80,6 @@ static unsigned int video_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -MODULE_PARM(card, "1-" __stringify(EM28XX_MAXBOARDS) "i"); -MODULE_PARM(video_nr, "1-" __stringify(EM28XX_MAXBOARDS) "i"); -MODULE_PARM(vbi_nr, "1-" __stringify(EM28XX_MAXBOARDS) "i"); -MODULE_PARM(radio_nr, "1-" __stringify(EM28XX_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) static int dummy; module_param_array(card, int, dummy, 0444); @@ -101,7 +92,6 @@ module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(card, "card type"); MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); @@ -1978,10 +1968,8 @@ static struct video_device *em28xx_vdev_init(struct em28xx *dev, return NULL; *vfd = *template; vfd->minor = -1; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0) vfd->dev = &dev->udev->dev; vfd->release = video_device_release; -#endif vfd->type = type; vfd->debug = video_debug; @@ -2167,9 +2155,6 @@ static void request_module_async(struct work_struct *work) request_module("em28xx-dvb"); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#define request_modules(dev) -#else static void request_modules(struct em28xx *dev) { #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) @@ -2180,7 +2165,6 @@ static void request_modules(struct em28xx *dev) #endif schedule_work(&dev->request_module_wk); } -#endif #else #define request_modules(dev) #endif /* CONFIG_MODULES */ diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c index 9a8795523..85806fe10 100644 --- a/linux/drivers/media/video/ir-kbd-i2c.c +++ b/linux/drivers/media/video/ir-kbd-i2c.c @@ -328,10 +328,8 @@ static int ir_detach(struct i2c_client *client); static int ir_probe(struct i2c_adapter *adap); static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "ir-kbd-i2c", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/m52790.c b/linux/drivers/media/video/m52790.c index 77536ccfc..51b0b2b30 100644 --- a/linux/drivers/media/video/m52790.c +++ b/linux/drivers/media/video/m52790.c @@ -31,10 +31,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("i2c device driver for m52790 A/V switch"); @@ -193,7 +189,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = m52790_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c index 5ea4fd801..b99d54996 100644 --- a/linux/drivers/media/video/msp3400-driver.c +++ b/linux/drivers/media/video/msp3400-driver.c @@ -57,17 +57,12 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) #include #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20) #include #else #include #endif -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#endif #include "compat.h" #include "msp3400-driver.h" @@ -90,7 +85,6 @@ int msp_dolby; int msp_stereo_thresh = 0x190; /* a2 threshold for stereo/bilingual (msp34xxg only) 0x00a0-0x03c0 */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) /* read-only */ module_param(opmode, int, 0444); @@ -101,15 +95,6 @@ module_param_named(stereo_threshold, msp_stereo_thresh, int, 0644); module_param_named(standard, msp_standard, int, 0644); module_param_named(amsound, msp_amsound, bool, 0644); module_param_named(dolby, msp_dolby, bool, 0644); -#else -MODULE_PARM(opmode, "i"); -MODULE_PARM(msp_once, "i"); -MODULE_PARM(msp_debug, "i"); -MODULE_PARM(msp_stereo_thresh, "i"); -MODULE_PARM(msp_standard, "i"); -MODULE_PARM(msp_amsound, "i"); -MODULE_PARM(msp_dolby, "i"); -#endif MODULE_PARM_DESC(opmode, "Forces a MSP3400 opmode. 0=Manual, 1=Autodetect, 2=Autodetect and autoselect"); MODULE_PARM_DESC(once, "No continuous stereo monitoring"); @@ -356,24 +341,6 @@ void msp_set_audio(struct i2c_client *client) /* ------------------------------------------------------------------------ */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -static void msp_setup_thread(struct msp_state *state) -{ - daemonize(); - exit_files(current); - reparent_to_init(); - - spin_lock_irq(SIGMASK_LOCK(current)); - sigfillset(¤t->blocked); - spin_unlock_irq(SIGMASK_LOCK(current)); - strcpy(current->comm, "msp3400"); - - state->kthread = current; - if (state->notify != NULL) - up(state->notify); -} -#endif - static void msp_wake_thread(struct i2c_client *client) { struct msp_state *state = i2c_get_clientdata(client); @@ -390,11 +357,7 @@ int msp_sleep(struct msp_state *state, int timeout) DECLARE_WAITQUEUE(wait, current); add_wait_queue(&state->wq, &wait); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if (!(state->rmmod || signal_pending(current))) { -#else if (!kthread_should_stop()) { -#endif if (timeout < 0) { set_current_state(TASK_INTERRUPTIBLE); schedule(); @@ -1018,20 +981,10 @@ static int msp_probe(struct i2c_client *client, const struct i2c_device_id *id) /* startup control thread if needed */ if (thread_func) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) state->kthread = kthread_run(thread_func, client, "msp34xx"); if (IS_ERR(state->kthread)) v4l_warn(client, "kernel_thread() failed\n"); -#else - DECLARE_MUTEX_LOCKED(sem); - - state->kthread = NULL; - state->notify = &sem; - kernel_thread(thread_func, client, 0); - down(&sem); - state->notify = NULL; -#endif msp_wake_thread(client); } return 0; @@ -1043,20 +996,8 @@ static int msp_remove(struct i2c_client *client) /* shutdown control thread */ if (state->kthread) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - DECLARE_MUTEX_LOCKED(sem); -#endif state->restart = 1; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - /* shutdown control thread */ - state->notify = &sem; - state->rmmod = 1; - wake_up_interruptible(&state->wq); - down(&sem); - state->notify = NULL; -#else kthread_stop(state->kthread); -#endif } msp_reset(client); @@ -1087,10 +1028,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { #endif }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif - /* * Overrides for Emacs so that we follow Linus's tabbing style. * --------------------------------------------------------------------------- diff --git a/linux/drivers/media/video/msp3400-driver.h b/linux/drivers/media/video/msp3400-driver.h index 20337567b..ab69a290e 100644 --- a/linux/drivers/media/video/msp3400-driver.h +++ b/linux/drivers/media/video/msp3400-driver.h @@ -92,10 +92,6 @@ struct msp_state { /* thread */ struct task_struct *kthread; wait_queue_head_t wq; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - struct semaphore *notify; - int rmmod:1; -#endif unsigned int restart:1; unsigned int watch_stereo:1; }; diff --git a/linux/drivers/media/video/msp3400-kthreads.c b/linux/drivers/media/video/msp3400-kthreads.c index 0280feaac..ba19edac0 100644 --- a/linux/drivers/media/video/msp3400-kthreads.c +++ b/linux/drivers/media/video/msp3400-kthreads.c @@ -31,13 +31,8 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) #include #include -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#endif #include "compat.h" #include "msp3400-driver.h" @@ -488,10 +483,6 @@ int msp3400c_thread(void *data) struct msp3400c_carrier_detect *cd; int count, max1, max2, val1, val2, val, i; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - msp_setup_thread(state); -#endif - v4l_dbg(1, msp_debug, client, "msp3400 daemon started\n"); set_freezable(); for (;;) { @@ -502,11 +493,7 @@ int msp3400c_thread(void *data) restart: v4l_dbg(2, msp_debug, client, "thread: restart scan\n"); state->restart = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if (state->rmmod || signal_pending(current)) -#else if (kthread_should_stop()) -#endif break; if (state->radio || MSP_MODE_EXTERN == state->mode) { @@ -669,12 +656,6 @@ no_second: } } v4l_dbg(1, msp_debug, client, "thread: exit\n"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - state->kthread = NULL; - - if (state->notify != NULL) - up(state->notify); -#endif return 0; } @@ -685,9 +666,6 @@ int msp3410d_thread(void *data) struct msp_state *state = i2c_get_clientdata(client); int val, i, std, count; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - msp_setup_thread(state); -#endif v4l_dbg(1, msp_debug, client, "msp3410 daemon started\n"); set_freezable(); for (;;) { @@ -698,11 +676,7 @@ int msp3410d_thread(void *data) restart: v4l_dbg(2, msp_debug, client, "thread: restart scan\n"); state->restart = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if (state->rmmod || signal_pending(current)) -#else if (kthread_should_stop()) -#endif break; if (state->mode == MSP_MODE_EXTERN) { @@ -842,12 +816,6 @@ restart: } } v4l_dbg(1, msp_debug, client, "thread: exit\n"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - state->kthread = NULL; - - if (state->notify != NULL) - up(state->notify); -#endif return 0; } @@ -993,9 +961,6 @@ int msp34xxg_thread(void *data) struct msp_state *state = i2c_get_clientdata(client); int val, i; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - msp_setup_thread(state); -#endif v4l_dbg(1, msp_debug, client, "msp34xxg daemon started\n"); set_freezable(); for (;;) { @@ -1006,11 +971,7 @@ int msp34xxg_thread(void *data) restart: v4l_dbg(1, msp_debug, client, "thread: restart scan\n"); state->restart = 0; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if (state->rmmod || signal_pending(current)) -#else if (kthread_should_stop()) -#endif break; if (state->mode == MSP_MODE_EXTERN) { @@ -1087,12 +1048,6 @@ unmute: } } v4l_dbg(1, msp_debug, client, "thread: exit\n"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - state->kthread = NULL; - - if (state->notify != NULL) - up(state->notify); -#endif return 0; } diff --git a/linux/drivers/media/video/pwc/pwc-ctrl.c b/linux/drivers/media/video/pwc/pwc-ctrl.c index 04fbd2749..1cccd5c77 100644 --- a/linux/drivers/media/video/pwc/pwc-ctrl.c +++ b/linux/drivers/media/video/pwc/pwc-ctrl.c @@ -1255,8 +1255,6 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) exactly the same otherwise. */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) - /* define local variable for arg */ #define ARG_DEF(ARG_type, ARG_name)\ ARG_type *ARG_name = arg; @@ -1269,25 +1267,6 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor) /* copy local variable to arg */ #define ARG_OUT(ARG_name) /* nothing */ -#else - -#define ARG_DEF(ARG_type, ARG_name)\ - ARG_type ARG_name; -#define ARG_IN(ARG_name)\ - if (copy_from_user(&ARG_name, arg, sizeof(ARG_name))) {\ - ret = -EFAULT;\ - break;\ - } -#define ARGR(ARG_name) ARG_name -#define ARGA(ARG_name) &ARG_name -#define ARG_OUT(ARG_name)\ - if (copy_to_user(arg, &ARG_name, sizeof(ARG_name))) {\ - ret = -EFAULT;\ - break;\ - } - -#endif - int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg) { int ret = 0; diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 0774c351a..514c2d600 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -31,10 +31,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif - #include #include "compat.h" @@ -404,11 +400,7 @@ static int saa6588_configure(struct saa6588 *s) /* ---------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind) -#else -static int saa6588_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind) -#endif { struct saa6588 *s; client_template.adapter = adap; @@ -448,9 +440,6 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, unsigned short fla s->timer.function = saa6588_timer; s->timer.data = (unsigned long)s; schedule_work(&s->work); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif return 0; } @@ -463,9 +452,7 @@ static int saa6588_probe(struct i2c_adapter *adap) switch (adap->id) { case I2C_HW_B_BT848: case I2C_HW_B_RIVA: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) case I2C_HW_SAA7134: -#endif return i2c_probe(adap, &addr_data, saa6588_attach); break; } @@ -526,10 +513,8 @@ static int saa6588_command(struct i2c_client *client, unsigned int cmd, /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)) && ( LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "saa6588", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index fc4c17bbd..be03921f7 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -48,9 +48,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif #include #include "compat.h" @@ -62,11 +59,7 @@ MODULE_AUTHOR( "Maxim Yevtyushkin, Kevin Thayer, Chris Kennedy, " MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, bool, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debug level (0-1)"); @@ -1602,7 +1595,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = saa7115_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c index a73ae00af..2ca3493dd 100644 --- a/linux/drivers/media/video/saa7127.c +++ b/linux/drivers/media/video/saa7127.c @@ -57,9 +57,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#endif #include "compat.h" static int debug; @@ -68,13 +65,8 @@ static int test_image; MODULE_DESCRIPTION("Philips SAA7127/9 video encoder driver"); MODULE_AUTHOR("Kevin Thayer, Chris Kennedy, Hans Verkuil"); MODULE_LICENSE("GPL"); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, int, 0644); module_param(test_image, int, 0644); -#else -MODULE_PARM(debug, "i"); -MODULE_PARM(test_image, "i"); -#endif MODULE_PARM_DESC(debug, "debug level (0-2)"); MODULE_PARM_DESC(test_image, "test_image (0-1)"); @@ -779,7 +771,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = saa7127_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index c2b1be5d2..21b36c993 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -14,10 +14,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif - #define MPEG_VIDEO_TARGET_BITRATE_MAX 27000 #define MPEG_VIDEO_MAX_BITRATE_MAX 27000 #define MPEG_TOTAL_TARGET_BITRATE_MAX 27000 @@ -695,11 +691,7 @@ static int saa6752hs_init(struct i2c_client* client) return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) -#else -static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short flags, int kind) -#endif { struct saa6752hs_state *h; @@ -718,10 +710,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, unsigned short f i2c_attach_client(&h->client); v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif return 0; } @@ -815,7 +803,7 @@ saa6752hs_command(struct i2c_client *client, unsigned int cmd, void *arg) /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, #endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 9ed2997f7..88a10fbd5 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -80,13 +80,6 @@ static unsigned int tuner[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; static unsigned int card[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(video_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -MODULE_PARM(vbi_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -MODULE_PARM(radio_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -MODULE_PARM(tuner_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -MODULE_PARM(card,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static int dummy; module_param_array(video_nr, int, dummy, 0444); @@ -101,7 +94,6 @@ module_param_array(radio_nr, int, NULL, 0444); module_param_array(tuner, int, NULL, 0444); module_param_array(card, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(video_nr, "video device number"); MODULE_PARM_DESC(vbi_nr, "vbi device number"); @@ -209,20 +201,6 @@ static void dump_statusregs(struct saa7134_dev *dev) #if defined(CONFIG_MODULES) && defined(MODULE) -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - -static void request_submodules(struct saa7134_dev *dev){ - if (card_is_empress(dev)) - request_module("saa7134-empress"); - if (card_is_dvb(dev)) - request_module("saa7134-dvb"); - if (alsa) - request_module("saa7134-alsa"); - if (oss) - request_module("saa7134-oss"); -} -#else - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) static void request_module_async(void *ptr){ struct saa7134_dev* dev=(struct saa7134_dev*)ptr; @@ -249,7 +227,6 @@ static void request_submodules(struct saa7134_dev *dev) #endif schedule_work(&dev->request_module_wk); } -#endif #else #define request_submodules(dev) @@ -893,10 +870,8 @@ static struct video_device *vdev_init(struct saa7134_dev *dev, return NULL; *vfd = *template; vfd->minor = -1; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) vfd->dev = &dev->pci->dev; vfd->release = video_device_release; -#endif vfd->debug = video_debug; snprintf(vfd->name, sizeof(vfd->name), "%s %s (%s)", dev->name, type, saa7134_boards[dev->board].name); diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index 837470f4d..cb74ac0c5 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -37,16 +37,12 @@ MODULE_LICENSE("GPL"); static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(empress_nr,"1-" __stringify(SAA7134_MAXBOARDS) "i"); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) static int dummy; module_param_array(empress_nr, int, dummy, 0444); #else module_param_array(empress_nr, int, NULL, 0444); #endif -#endif MODULE_PARM_DESC(empress_nr,"ts device number"); static unsigned int debug; @@ -482,10 +478,8 @@ static int empress_init(struct saa7134_dev *dev) if (NULL == dev->empress_dev) return -ENOMEM; *(dev->empress_dev) = saa7134_empress_template; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) dev->empress_dev->dev = &dev->pci->dev; dev->empress_dev->release = video_device_release; -#endif snprintf(dev->empress_dev->name, sizeof(dev->empress_dev->name), "%s empress (%s)", dev->name, saa7134_boards[dev->board].name); diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 64858dfe8..9f94def45 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -368,9 +368,7 @@ static struct i2c_algorithm saa7134_algo = { }; static struct i2c_adapter saa7134_adap_template = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) .owner = THIS_MODULE, -#endif #ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, #endif @@ -447,9 +445,7 @@ void saa7134_i2c_call_clients(struct saa7134_dev *dev, int saa7134_i2c_register(struct saa7134_dev *dev) { dev->i2c_adap = saa7134_adap_template; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,66) dev->i2c_adap.dev.parent = &dev->pci->dev; -#endif strcpy(dev->i2c_adap.name,dev->name); dev->i2c_adap.algo_data = dev; i2c_add_adapter(&dev->i2c_adap); diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c index aecaa7cd0..c12184a38 100644 --- a/linux/drivers/media/video/saa7134/saa7134-input.c +++ b/linux/drivers/media/video/saa7134/saa7134-input.c @@ -463,7 +463,6 @@ int saa7134_input_init1(struct saa7134_dev *dev) ir_input_init(input_dev, &ir->ir, ir_type, ir_codes); input_dev->name = ir->name; -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0) input_dev->phys = ir->phys; input_dev->id.bustype = BUS_PCI; input_dev->id.version = 1; @@ -482,7 +481,6 @@ int saa7134_input_init1(struct saa7134_dev *dev) #else input_dev->dev = &dev->pci->dev; #endif -#endif #endif dev->remote = ir; diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index a4fe3c41b..f7a3f1d0a 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -496,14 +496,6 @@ static int tvaudio_thread(void *data) unsigned int i, audio, nscan; int max1,max2,carrier,rx,mode,lastmode,default_carrier; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61) - lock_kernel(); - daemonize(); - sigfillset(¤t->blocked); - sprintf(current->comm, "%s", dev->name); - unlock_kernel(); -#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) set_freezable(); #endif @@ -821,14 +813,6 @@ static int tvaudio_thread_ddep(void *data) struct saa7134_dev *dev = data; u32 value, norms; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61) - lock_kernel(); - daemonize(); - sigfillset(¤t->blocked); - sprintf(current->comm, "%s", dev->name); - unlock_kernel(); -#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 23) set_freezable(); #endif diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h index 987c4338f..08bc1d0fa 100644 --- a/linux/drivers/media/video/saa7134/saa7134.h +++ b/linux/drivers/media/video/saa7134/saa7134.h @@ -41,12 +41,8 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,64) -#include "i2c-compat.h" -#else #include #include -#endif #if defined(CONFIG_VIDEO_SAA7134_DVB) || defined(CONFIG_VIDEO_SAA7134_DVB_MODULE) #include #endif @@ -450,13 +446,11 @@ struct saa7134_dmasound { unsigned int read_offset; unsigned int read_count; void * priv_data; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,16) snd_pcm_substream_t *substream; #else struct snd_pcm_substream *substream; #endif -#endif }; /* ts/mpeg status */ diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index adcc7adc5..38d4707c5 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -47,11 +47,7 @@ MODULE_AUTHOR("K. Ohta, T. Adachi, Hans Verkuil"); MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, int, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debug level (0-1)"); /* @@ -1542,6 +1538,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = saa717x_id, #endif }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index 5c58967ce..f873e3256 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -47,10 +47,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#else -#endif #include #include #include "compat.h" @@ -314,12 +310,7 @@ static void do_tda7432_init(struct i2c_client *client) * i2c interface functions * * *********************** */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind) -#else -static int tda7432_attach(struct i2c_adapter *adap, int addr, - unsigned short flags, int kind) -#endif { struct tda7432 *t; struct i2c_client *client; @@ -335,9 +326,6 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, i2c_set_clientdata(client, t); do_tda7432_init(client); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif i2c_attach_client(client); v4l_info(client, "chip found @ 0x%x (%s)\n", addr << 1, adap->name); @@ -364,9 +352,6 @@ static int tda7432_detach(struct i2c_client *client) i2c_detach_client(client); kfree(t); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } @@ -531,10 +516,8 @@ static int tda7432_command(struct i2c_client *client, } static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tda7432", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c index c41e50ba6..48675e2e1 100644 --- a/linux/drivers/media/video/tda9840.c +++ b/linux/drivers/media/video/tda9840.c @@ -231,10 +231,8 @@ static int detach(struct i2c_client *client) } static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .owner = THIS_MODULE, .name = "tda9840", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index 340ea2300..b32a34c4b 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -31,11 +31,6 @@ #include #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "id.h" -#include "i2c-compat.h" -#endif - #include static int debug; /* insmod parameter */ @@ -244,12 +239,7 @@ static int tda9875_checkit(struct i2c_adapter *adap, int addr) return(0); } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind) -#else -static int tda9875_attach(struct i2c_adapter *adap, int addr, - unsigned short flags, int kind) -#endif { struct tda9875 *t; struct i2c_client *client; @@ -271,9 +261,6 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr, } do_tda9875_init(client); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif printk(KERN_INFO "tda9875: init\n"); i2c_attach_client(client); @@ -300,9 +287,6 @@ static int tda9875_detach(struct i2c_client *client) i2c_detach_client(client); kfree(t); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } @@ -456,10 +440,8 @@ static int tda9875_command(struct i2c_client *client, static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "tda9875", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c index 16f369195..989dd8589 100644 --- a/linux/drivers/media/video/tea6415c.c +++ b/linux/drivers/media/video/tea6415c.c @@ -200,10 +200,8 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) } static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .owner = THIS_MODULE, .name = "tea6415c", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c index 7a8fec9cf..6c244ca15 100644 --- a/linux/drivers/media/video/tea6420.c +++ b/linux/drivers/media/video/tea6420.c @@ -176,10 +176,8 @@ static int command(struct i2c_client *client, unsigned int cmd, void *arg) } static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) &&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .owner = THIS_MODULE, .name = "tea6420", .flags = I2C_DF_NOTIFY, #else diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c index 9f96e200c..6c463a6f7 100644 --- a/linux/drivers/media/video/tlv320aic23b.c +++ b/linux/drivers/media/video/tlv320aic23b.c @@ -32,10 +32,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("tlv320aic23b driver"); @@ -175,9 +171,6 @@ static int tlv320aic23b_remove(struct i2c_client *client) } /* ----------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id tlv320aic23b_id[] = { diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index e0228b865..16d2df0d5 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -21,9 +21,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#endif #include "mt20xx.h" #include "tda8290.h" #include "tea5761.h" @@ -162,17 +159,6 @@ static char secam[] = "--"; static char ntsc[] = "-"; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -MODULE_PARM(pal,"s"); -MODULE_PARM(secam,"s"); -MODULE_PARM(ntsc,"s"); -MODULE_PARM(tv_range,"2i"); -MODULE_PARM(radio_range,"2i"); -MODULE_PARM(no_autodetect, "i"); -MODULE_PARM(tuner_debug, "i"); -MODULE_PARM(addr, "i"); -MODULE_PARM(show_i2c, "i"); -#else module_param(addr, int, 0444); module_param(no_autodetect, int, 0444); module_param(show_i2c, int, 0444); @@ -188,7 +174,6 @@ module_param_array(radio_range, int, dummy, 0644); module_param_array(tv_range, int, NULL, 0644); module_param_array(radio_range, int, NULL, 0644); #endif -#endif MODULE_DESCRIPTION("device driver for various TV and TV+FM radio tuners"); MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); @@ -1350,10 +1335,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { #endif }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif - /* * Overrides for Emacs so that we follow Linus's tabbing style. * --------------------------------------------------------------------------- diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 830dbe8db..961736a11 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -31,10 +31,6 @@ #endif #include "compat.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include "i2c-compat.h" -#else -#endif #include #include #include @@ -1854,9 +1850,7 @@ static int chip_legacy_probe(struct i2c_adapter *adap) switch (adap->id) { case I2C_HW_B_BT848: case I2C_HW_B_RIVA: -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) case I2C_HW_SAA7134: -#endif return 1; } #endif diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c index e38bda67a..dc0bd9fda 100644 --- a/linux/drivers/media/video/tveeprom.c +++ b/linux/drivers/media/video/tveeprom.c @@ -36,9 +36,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include -#endif #include #include diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index ca7330e10..43ec790d6 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -19,16 +19,6 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -# include "i2c-compat.h" -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,71) -# define strlcpy(dest,src,len) strncpy(dest,src,(len)-1) -#endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -# define iminor(inode) minor(inode->i_rdev) -#endif - #define DEV_MAX 4 static int devnr = -1; @@ -210,10 +200,8 @@ static int tvmixer_open(struct inode *inode, struct file *file) if (client->adapter->inc_use) client->adapter->inc_use(client->adapter); #endif -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54) if (client->adapter->owner) try_module_get(client->adapter->owner); -#endif return 0; } @@ -231,17 +219,13 @@ static int tvmixer_release(struct inode *inode, struct file *file) if (client->adapter->dec_use) client->adapter->dec_use(client->adapter); #endif -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,54) module_put(client->adapter->owner); -#endif return 0; } static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) - .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .owner = THIS_MODULE, .name = "tvmixer", .flags = I2C_DF_NOTIFY, #else @@ -269,20 +253,10 @@ static const struct file_operations tvmixer_fops = { static int tvmixer_adapters(struct i2c_adapter *adap) { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54) struct i2c_client *client; list_for_each_entry(client, &adap->clients, list) tvmixer_clients(client); -#else - int i; - - for (i=0; iclients[i]) - continue; - tvmixer_clients(adap->clients[i]); - } -#endif return 0; } diff --git a/linux/drivers/media/video/tvp5150.c b/linux/drivers/media/video/tvp5150.c index 7dc6623cc..bb88eb5c0 100644 --- a/linux/drivers/media/video/tvp5150.c +++ b/linux/drivers/media/video/tvp5150.c @@ -12,12 +12,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) -#include -#include -#include -#include "i2c-compat.h" -#endif #include "tvp5150_reg.h" @@ -1148,13 +1142,8 @@ static struct i2c_client client_template = { .driver = &driver, }; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) static int tvp5150_detect_client(struct i2c_adapter *adapter, int address, int kind) -#else -static int tvp5150_detect_client(struct i2c_adapter *adapter, - int address, unsigned short flags, int kind) -#endif { struct i2c_client *c; struct tvp5150 *core; @@ -1204,9 +1193,6 @@ static int tvp5150_detect_client(struct i2c_adapter *adapter, if (debug > 1) dump_reg(c); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif return 0; } @@ -1242,7 +1228,7 @@ static int tvp5150_detach_client(struct i2c_client *c) /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, #endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c index c59944d72..05e84aed0 100644 --- a/linux/drivers/media/video/upd64031a.c +++ b/linux/drivers/media/video/upd64031a.c @@ -46,11 +46,7 @@ MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil"); MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, int, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debug level (0-1)"); @@ -241,9 +237,6 @@ static int upd64031a_remove(struct i2c_client *client) } /* ----------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -EXPORT_NO_SYMBOLS; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id upd64031a_id[] = { diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c index 3dcc5a293..b1981d6bc 100644 --- a/linux/drivers/media/video/upd64083.c +++ b/linux/drivers/media/video/upd64083.c @@ -37,11 +37,7 @@ MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil"); MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, bool, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debug level (0-1)"); @@ -218,9 +214,6 @@ static int upd64083_remove(struct i2c_client *client) } /* ----------------------------------------------------------------------- */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0) -EXPORT_NO_SYMBOLS; -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) static const struct i2c_device_id upd64083_id[] = { diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index ce9348a07..c5bc897e9 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -45,13 +45,7 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#include -#include -#include -#else #include -#endif #ifdef CONFIG_KMOD #include @@ -174,40 +168,6 @@ static void usbvision_rvfree(void *mem, unsigned long size) vfree(mem); } -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,24) -/* helper functions to access driver private data. */ -static inline void *video_get_drvdata(struct video_device *dev) -{ - return dev->priv; -} - -static inline void video_set_drvdata(struct video_device *dev, void *data) -{ - dev->priv = data; -} - -struct video_device *video_device_alloc(void) -{ - struct video_device *vfd; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) - vfd = kmalloc(sizeof(*vfd),GFP_KERNEL); - if (NULL == vfd) - return NULL; - memset(vfd,0,sizeof(*vfd)); -#else - vfd = kzalloc(sizeof(*vfd),GFP_KERNEL); - if (NULL == vfd) - return NULL; -#endif - return vfd; -} - -void video_device_release(struct video_device *vfd) -{ - kfree(vfd); -} -#endif - #if ENABLE_HEXDUMP static void usbvision_hexdump(const unsigned char *data, int len) @@ -1485,7 +1445,7 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision, return totlen; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) || LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) static void usbvision_isocIrq(struct urb *urb) { #else @@ -1559,7 +1519,6 @@ static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs) urb->iso_frame_desc[i].actual_length = 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) urb->status = 0; urb->dev = usbvision->dev; errCode = usb_submit_urb (urb, GFP_ATOMIC); @@ -1568,7 +1527,6 @@ static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs) err("%s: usb_submit_urb failed: error %d", __func__, errCode); } -#endif return; } @@ -1632,7 +1590,7 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg, } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) || LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18) static void usbvision_ctrlUrb_complete(struct urb *urb) #else static void usbvision_ctrlUrb_complete(struct urb *urb, struct pt_regs *regs) @@ -1662,19 +1620,11 @@ static int usbvision_write_reg_irq(struct usb_usbvision *usbvision,int address, } usbvision->ctrlUrbBusy = 1; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20) - usbvision->ctrlUrbSetup.requesttype = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT; - usbvision->ctrlUrbSetup.request = USBVISION_OP_CODE; - usbvision->ctrlUrbSetup.value = 0; - usbvision->ctrlUrbSetup.index = cpu_to_le16(address); - usbvision->ctrlUrbSetup.length = cpu_to_le16(len); -#else usbvision->ctrlUrbSetup.bRequestType = USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_ENDPOINT; usbvision->ctrlUrbSetup.bRequest = USBVISION_OP_CODE; usbvision->ctrlUrbSetup.wValue = 0; usbvision->ctrlUrbSetup.wIndex = cpu_to_le16(address); usbvision->ctrlUrbSetup.wLength = cpu_to_le16(len); -#endif usb_fill_control_urb (usbvision->ctrlUrb, usbvision->dev, usb_sndctrlpipe(usbvision->dev, 1), (unsigned char *)&usbvision->ctrlUrbSetup, @@ -1684,11 +1634,7 @@ static int usbvision_write_reg_irq(struct usb_usbvision *usbvision,int address, memcpy(usbvision->ctrlUrbBuffer, data, len); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - errCode = usb_submit_urb(usbvision->ctrlUrb); -#else errCode = usb_submit_urb(usbvision->ctrlUrb, GFP_ATOMIC); -#endif if (errCode < 0) { // error in usb_submit_urb() usbvision->ctrlUrbBusy = 0; @@ -2385,18 +2331,12 @@ static void usbvision_powerOffTimer(unsigned long data) PDEBUG(DBG_FUNC, ""); del_timer(&usbvision->powerOffTimer); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - INIT_TQUEUE(&usbvision->powerOffTask, call_usbvision_power_off, usbvision); - (void) schedule_task(&usbvision->powerOffTask); -#else #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20) INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off, usbvision); #else INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off); #endif (void) schedule_work(&usbvision->powerOffWork); -#endif - } void usbvision_init_powerOffTimer(struct usb_usbvision *usbvision) @@ -2568,11 +2508,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) int j, k; struct urb *urb; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - urb = usb_alloc_urb(USBVISION_URB_FRAMES); -#else urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL); -#endif if (urb == NULL) { err("%s: usb_alloc_urb() failed", __func__); return -ENOMEM; @@ -2586,12 +2522,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) urb->dev = dev; urb->context = usbvision; urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - urb->transfer_flags = USB_ISO_ASAP; -#else urb->transfer_flags = URB_ISO_ASAP; urb->interval = 1; -#endif urb->transfer_buffer = usbvision->sbuf[bufIdx].data; urb->complete = usbvision_isocIrq; urb->number_of_packets = USBVISION_URB_FRAMES; @@ -2605,28 +2537,10 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision) } } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - /* Link URBs into a ring so that they invoke each other infinitely */ - for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { - if ((bufIdx + 1) < USBVISION_NUMSBUF) { - usbvision->sbuf[bufIdx].urb->next = - usbvision->sbuf[bufIdx + 1].urb; - } - else { - usbvision->sbuf[bufIdx].urb->next = - usbvision->sbuf[0].urb; - } - } -#endif - /* Submit all URBs */ for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { - #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb); - #else errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL); - #endif if (errCode) { err("%s: usb_submit_urb(%d) failed: error %d", __func__, bufIdx, errCode); diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c index 67efd7821..d6d12debc 100644 --- a/linux/drivers/media/video/usbvision/usbvision-i2c.c +++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c @@ -208,9 +208,6 @@ static void dec_use(struct i2c_adapter *adap) /* -----exported algorithm data: ------------------------------------- */ static struct i2c_algorithm usbvision_algo = { -#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE > KERNEL_VERSION(2,4,30)) - .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) .name = "USB algorithm", .id = I2C_ALGO_BIT, /* FIXME */ diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c index 55b3f5e60..bd3d49abf 100644 --- a/linux/drivers/media/video/usbvision/usbvision-video.c +++ b/linux/drivers/media/video/usbvision/usbvision-video.c @@ -68,13 +68,7 @@ #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -#include -#include -#include -#else #include -#endif #ifdef CONFIG_KMOD #include @@ -173,10 +167,8 @@ MODULE_PARM_DESC(vbi_nr, "Set vbi device number (/dev/vbiX). Default: -1 (autod MODULE_AUTHOR(DRIVER_AUTHOR); MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE(DRIVER_LICENSE); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) MODULE_VERSION(USBVISION_VERSION_STRING); MODULE_ALIAS(DRIVER_ALIAS); -#endif /*****************************************************************************/ @@ -187,8 +179,6 @@ MODULE_ALIAS(DRIVER_ALIAS); /* /sys/bus/usb/drivers/USBVision Video Grabber */ /*****************************************************************************/ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) - #define YES_NO(x) ((x) ? "Yes" : "No") static inline struct usb_usbvision *cd_to_usbvision(struct device *cd) @@ -379,8 +369,6 @@ static void usbvision_remove_sysfs(struct video_device *vdev) } } -#endif - /* * usbvision_open() * @@ -389,25 +377,15 @@ static void usbvision_remove_sysfs(struct video_device *vdev) * then allocates buffers needed for video processing. * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static int usbvision_v4l2_open(struct video_device *dev, int flags) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *) dev; -#else static int usbvision_v4l2_open(struct inode *inode, struct file *file) { struct video_device *dev = video_devdata(file); struct usb_usbvision *usbvision = (struct usb_usbvision *) video_get_drvdata(dev); -#endif int errCode = 0; PDEBUG(DBG_IO, "open"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_INC_USE_COUNT; -#endif - usbvision_reset_powerOffTimer(usbvision); if (usbvision->user) @@ -461,12 +439,6 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file) mutex_unlock(&usbvision->lock); } - if (errCode) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif - } - /* prepare queues */ usbvision_empty_framequeues(usbvision); @@ -482,17 +454,11 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file) * allocated in usbvision_v4l2_open(). * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static void usbvision_v4l2_close(struct video_device *dev) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *) dev; -#else static int usbvision_v4l2_close(struct inode *inode, struct file *file) { struct video_device *dev = video_devdata(file); struct usb_usbvision *usbvision = (struct usb_usbvision *) video_get_drvdata(dev); -#endif PDEBUG(DBG_IO, "close"); mutex_lock(&usbvision->lock); @@ -523,14 +489,7 @@ static int usbvision_v4l2_close(struct inode *inode, struct file *file) } PDEBUG(DBG_IO, "success"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif - - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19) return 0; -#endif } @@ -1123,12 +1082,6 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, return 0; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static long usbvision_v4l2_read(struct video_device *dev, char *buf, - unsigned long count, int noblock) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *) dev; -#else static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { @@ -1136,7 +1089,6 @@ static ssize_t usbvision_v4l2_read(struct file *file, char __user *buf, struct usb_usbvision *usbvision = (struct usb_usbvision *) video_get_drvdata(dev); int noblock = file->f_flags & O_NONBLOCK; -#endif unsigned long lock_flags; int ret,i; @@ -1302,24 +1254,15 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma) * Here comes the stuff for radio on usbvision based devices * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static int usbvision_radio_open(struct video_device *dev, int flags) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *)dev->priv; -#else static int usbvision_radio_open(struct inode *inode, struct file *file) { struct video_device *dev = video_devdata(file); struct usb_usbvision *usbvision = (struct usb_usbvision *) video_get_drvdata(dev); -#endif int errCode = 0; PDEBUG(DBG_IO, "%s:", __func__); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_INC_USE_COUNT; -#endif mutex_lock(&usbvision->lock); if (usbvision->user) { @@ -1351,9 +1294,6 @@ static int usbvision_radio_open(struct inode *inode, struct file *file) } if (errCode) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif if (PowerOnAtOpen) { usbvision_i2c_unregister(usbvision); usbvision_power_off(usbvision); @@ -1366,18 +1306,12 @@ out: } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static void usbvision_radio_close(struct video_device *dev) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *)dev->priv; -#else static int usbvision_radio_close(struct inode *inode, struct file *file) { struct video_device *dev = video_devdata(file); struct usb_usbvision *usbvision = (struct usb_usbvision *) video_get_drvdata(dev); int errCode = 0; -#endif PDEBUG(DBG_IO, ""); @@ -1404,42 +1338,22 @@ static int usbvision_radio_close(struct inode *inode, struct file *file) usbvision_release(usbvision); } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif - PDEBUG(DBG_IO, "success"); - -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,19) return errCode; -#endif } /* * Here comes the stuff for vbi on usbvision based devices * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static int usbvision_vbi_open(struct video_device *dev, int flags) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *)dev->priv; -#else static int usbvision_vbi_open(struct inode *inode, struct file *file) { -#endif /* TODO */ return -ENODEV; - } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static void usbvision_vbi_close(struct video_device *dev) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *)dev->priv; -#else static int usbvision_vbi_close(struct inode *inode, struct file *file) { -#endif /* TODO */ return -ENODEV; } @@ -1463,21 +1377,8 @@ static int usbvision_vbi_ioctl(struct inode *inode, struct file *file, // // Video template -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static struct video_device usbvision_video_template = { - .type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, - .open = usbvision_v4l2_open, - .close = usbvision_v4l2_close, - .read = usbvision_v4l2_read, - .mmap = usbvision_v4l2_mmap, - .ioctl = video_ioctl2, - .minor = -1, -}; -#else static const struct file_operations usbvision_fops = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .open = usbvision_v4l2_open, .release = usbvision_v4l2_close, .read = usbvision_v4l2_read, @@ -1490,15 +1391,11 @@ static const struct file_operations usbvision_fops = { #endif }; static struct video_device usbvision_video_template = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .type = VID_TYPE_TUNER | VID_TYPE_CAPTURE, .fops = &usbvision_fops, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .name = "usbvision-video", .release = video_device_release, -#endif .minor = -1, .vidioc_querycap = vidioc_querycap, .vidioc_enum_fmt_vid_cap = vidioc_enum_fmt_vid_cap, @@ -1534,24 +1431,11 @@ static struct video_device usbvision_video_template = { .tvnorms = USBVISION_NORMS, .current_norm = V4L2_STD_PAL }; -#endif // Radio template -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static struct video_device usbvision_radio_template= -{ - .type = VID_TYPE_TUNER, - .open = usbvision_radio_open, - .close = usbvision_radio_close, - .ioctl = video_ioctl2, - .minor -1, -}; -#else static const struct file_operations usbvision_radio_fops = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .open = usbvision_radio_open, .release = usbvision_radio_close, .ioctl = video_ioctl2, @@ -1563,15 +1447,11 @@ static const struct file_operations usbvision_radio_fops = { static struct video_device usbvision_radio_template= { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .type = VID_TYPE_TUNER, .fops = &usbvision_radio_fops, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .name = "usbvision-radio", .release = video_device_release, -#endif .minor = -1, .vidioc_querycap = vidioc_querycap, .vidioc_enum_input = vidioc_enum_input, @@ -1590,23 +1470,10 @@ static struct video_device usbvision_radio_template= .tvnorms = USBVISION_NORMS, .current_norm = V4L2_STD_PAL }; -#endif // vbi template -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19) -static struct video_device usbvision_vbi_template= -{ - type: VID_TYPE_TELETEXT, - open: usbvision_vbi_open, - close: usbvision_vbi_close, - ioctl: usbvision_vbi_ioctl, - minor: -1, -}; -#else static const struct file_operations usbvision_vbi_fops = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .open = usbvision_vbi_open, .release = usbvision_vbi_close, .ioctl = usbvision_vbi_ioctl, @@ -1618,18 +1485,13 @@ static const struct file_operations usbvision_vbi_fops = { static struct video_device usbvision_vbi_template= { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31) .owner = THIS_MODULE, -#endif .type = VID_TYPE_TUNER, .fops = &usbvision_vbi_fops, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .release = video_device_release, .name = "usbvision-vbi", -#endif .minor = -1, }; -#endif static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, @@ -1650,9 +1512,7 @@ static struct video_device *usbvision_vdev_init(struct usb_usbvision *usbvision, } *vdev = *vdev_template; // vdev->minor = -1; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) vdev->dev = &usb_dev->dev; -#endif snprintf(vdev->name, sizeof(vdev->name), "%s", name); video_set_drvdata(vdev, usbvision); return vdev; @@ -1667,9 +1527,6 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision) usbvision->vbi->minor & 0x1f); if (usbvision->vbi->minor != -1) { video_unregister_device(usbvision->vbi); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - video_device_release(usbvision->vbi); -#endif } else { video_device_release(usbvision->vbi); } @@ -1682,9 +1539,6 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision) usbvision->rdev->minor & 0x1f); if (usbvision->rdev->minor != -1) { video_unregister_device(usbvision->rdev); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - video_device_release(usbvision->rdev); -#endif } else { video_device_release(usbvision->rdev); } @@ -1697,9 +1551,6 @@ static void usbvision_unregister_video(struct usb_usbvision *usbvision) usbvision->vdev->minor & 0x1f); if (usbvision->vdev->minor != -1) { video_unregister_device(usbvision->vdev); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - video_device_release(usbvision->vdev); -#endif } else { video_device_release(usbvision->vdev); } @@ -1799,11 +1650,7 @@ static struct usb_usbvision *usbvision_alloc(struct usb_device *dev) mutex_init(&usbvision->lock); /* available */ // prepare control urb for control messages during interrupts -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - usbvision->ctrlUrb = usb_alloc_urb(USBVISION_URB_FRAMES); -#else usbvision->ctrlUrb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL); -#endif if (usbvision->ctrlUrb == NULL) { goto err_exit; } @@ -2006,12 +1853,7 @@ static int __devinit usbvision_probe(struct usb_interface *intf, usbvision_create_sysfs(usbvision->vdev); PDEBUG(DBG_PROBE, "success"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; - return usbvision; -#else return 0; -#endif } @@ -2023,15 +1865,9 @@ static int __devinit usbvision_probe(struct usb_interface *intf, * with no ill consequences. * */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) -static void usbvision_disconnect(struct usb_device *dev, void *ptr) -{ - struct usb_usbvision *usbvision = (struct usb_usbvision *) ptr; -#else static void __devexit usbvision_disconnect(struct usb_interface *intf) { struct usb_usbvision *usbvision = usb_get_intfdata(intf); -#endif PDEBUG(DBG_PROBE, ""); @@ -2039,11 +1875,7 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) err("%s: usb_get_intfdata() failed", __func__); return; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_INC_USE_COUNT; -#else usb_set_intfdata (intf, NULL); -#endif mutex_lock(&usbvision->lock); @@ -2056,9 +1888,7 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) } usbvision->remove_pending = 1; // Now all ISO data will be ignored -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) usb_put_dev(usbvision->dev); -#endif usbvision->dev = NULL; // USB device is no more mutex_unlock(&usbvision->lock); @@ -2073,15 +1903,10 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf) } PDEBUG(DBG_PROBE, "success"); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - MOD_DEC_USE_COUNT; -#endif } static struct usb_driver usbvision_driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,31)) && \ - (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16)) +#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,16) .owner = THIS_MODULE, #endif .name = "usbvision", diff --git a/linux/drivers/media/video/usbvision/usbvision.h b/linux/drivers/media/video/usbvision/usbvision.h index 9f4c40dbf..371c6987f 100644 --- a/linux/drivers/media/video/usbvision/usbvision.h +++ b/linux/drivers/media/video/usbvision/usbvision.h @@ -401,11 +401,7 @@ struct usb_usbvision { struct semaphore lock; #endif struct timer_list powerOffTimer; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0) - struct tq_struct powerOffTask; -#else struct work_struct powerOffWork; -#endif int power; /* is the device powered on? */ int user; /* user count for exclusive use */ int initialized; /* Had we already sent init sequence? */ diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c index b721aca4e..c8b3da9f6 100644 --- a/linux/drivers/media/video/v4l2-common.c +++ b/linux/drivers/media/video/v4l2-common.c @@ -732,9 +732,6 @@ int v4l2_i2c_attach(struct i2c_adapter *adapter, int address, struct i2c_driver err = probe(client, NULL); if (err == 0) { i2c_attach_client(client); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_INC_USE_COUNT; -#endif } else { kfree(client); } diff --git a/linux/drivers/media/video/videobuf-dma-sg.c b/linux/drivers/media/video/videobuf-dma-sg.c index 7d459ed6b..22c3c93b2 100644 --- a/linux/drivers/media/video/videobuf-dma-sg.c +++ b/linux/drivers/media/video/videobuf-dma-sg.c @@ -409,11 +409,7 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, page = alloc_page(GFP_USER | __GFP_DMA32); if (!page) return NOPAGE_OOM; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,20) - clear_user_page(page_address(page), vaddr); -#else clear_user_page(page_address(page), vaddr, page); -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1) if (type) *type = VM_FAULT_MINOR; diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c index 12307d4bd..5d29fb09c 100644 --- a/linux/drivers/media/video/vivi.c +++ b/linux/drivers/media/video/vivi.c @@ -40,9 +40,7 @@ #include #include #include -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) #include -#endif #include #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 20) #include @@ -161,10 +159,6 @@ struct vivi_dmaqueue { /* thread for generating video stream*/ struct task_struct *kthread; wait_queue_head_t wq; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - struct semaphore *notify; - int rmmod:1; -#endif /* Counters to control fps rate */ int frame; int ini_jiffies; @@ -446,13 +440,8 @@ static void vivi_sleep(struct vivi_fh *fh) (unsigned long)dma_q); add_wait_queue(&dma_q->wq, &wait); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if ((q->rmmod || signal_pending(current))) - goto stop_task; -#else if (kthread_should_stop()) goto stop_task; -#endif /* Calculate time to wake up */ timeout = msecs_to_jiffies(frames_to_ms(1)); @@ -471,20 +460,6 @@ static int vivi_thread(void *data) struct vivi_fh *fh = data; struct vivi_dev *dev = fh->dev; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - daemonize(); - exit_files(current); - reparent_to_init(); - - spin_lock_irq(SIGMASK_LOCK(current)); - sigfillset(¤t->blocked); - spin_unlock_irq(SIGMASK_LOCK(current)); - strcpy(current->comm, "vivi"); - - dma_q->kthread = current; - if (dma_q->notify != NULL) - up(dma_q->notify); -#endif dprintk(dev, 1, "thread started\n"); set_freezable(); @@ -492,20 +467,10 @@ static int vivi_thread(void *data) for (;;) { vivi_sleep(fh); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - if (dma_q->rmmod || signal_pending(current)) -#else if (kthread_should_stop()) -#endif break; } dprintk(dev, 1, "thread: exit\n"); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - dma_q->kthread = NULL; - - if (dma_q->notify != NULL) - up(dma_q->notify); -#endif return 0; } @@ -519,28 +484,12 @@ static int vivi_start_thread(struct vivi_fh *fh) dprintk(dev, 1, "%s\n", __func__); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 5, 0) dma_q->kthread = kthread_run(vivi_thread, fh, "vivi"); if (IS_ERR(dma_q->kthread)) { printk(KERN_ERR "vivi: kernel_thread() failed\n"); return PTR_ERR(dma_q->kthread); } -#else - DECLARE_MUTEX_LOCKED(sem); - - dma_q->kthread = NULL; - dma_q->notify = &sem; - dma_q->rmmod = 0; - - if (kernel_thread(vivi_thread, fh, 0) < 0) { - printk(KERN_ERR "sdim: kernel_thread() failed\n"); - return -EINVAL; - } - - down(&sem); - dma_q->notify = NULL; -#endif /* Wakes thread */ wake_up_interruptible(&dma_q->wq); @@ -555,19 +504,7 @@ static void vivi_stop_thread(struct vivi_dmaqueue *dma_q) dprintk(dev, 1, "%s\n", __func__); /* shutdown control thread */ if (dma_q->kthread) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) - DECLARE_MUTEX_LOCKED(sem); - - /* shutdown control thread */ - dma_q->notify = &sem; - dma_q->rmmod = 1; - if (waitqueue_active(&dma_q->wq)) - wake_up_interruptible(&dma_q->wq); - down(&sem); - dma_q->notify = NULL; -#else kthread_stop(dma_q->kthread); -#endif dma_q->kthread = NULL; } } diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index 25a69c7f5..c368dfe84 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -31,10 +31,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("vp27smpx driver"); @@ -190,7 +186,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = vp27smpx_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c index d448dcf6e..1eb8ef8a5 100644 --- a/linux/drivers/media/video/wm8739.c +++ b/linux/drivers/media/video/wm8739.c @@ -31,10 +31,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("wm8739 driver"); @@ -43,11 +39,7 @@ MODULE_LICENSE("GPL"); static int debug; -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 0) module_param(debug, int, 0644); -#else -MODULE_PARM(debug, "i"); -#endif MODULE_PARM_DESC(debug, "Debug level (0-1)"); @@ -352,7 +344,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = wm8739_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index 81a08d674..fdb9f55f1 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -35,10 +35,6 @@ #include #include #include -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -#include "i2c-compat.h" -#include -#endif #include "compat.h" MODULE_DESCRIPTION("wm8775 driver"); @@ -242,7 +238,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .id_table = wm8775_id, #endif }; - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) -EXPORT_NO_SYMBOLS; -#endif -- cgit v1.2.3 From 1e35850ac2509c324478d38091880e60ab28795f Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 01:17:00 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.10 From: Hans Verkuil Phase 2 removes support for kernels < 2.6.10. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/bt8xx/bt832.c | 5 ----- linux/drivers/media/video/bt8xx/bttv-cards.c | 10 ---------- linux/drivers/media/video/bt8xx/bttv-driver.c | 17 ----------------- linux/drivers/media/video/bt8xx/bttv-i2c.c | 4 ---- linux/drivers/media/video/bt8xx/bttvp.h | 3 --- linux/drivers/media/video/cx18/cx18-i2c.c | 8 +------- linux/drivers/media/video/cx23885/cx23885-video.c | 7 ------- linux/drivers/media/video/cx88/cx88-alsa.c | 13 ------------- linux/drivers/media/video/cx88/cx88-cards.c | 7 ------- linux/drivers/media/video/cx88/cx88-i2c.c | 4 ---- linux/drivers/media/video/cx88/cx88-mpeg.c | 8 -------- linux/drivers/media/video/cx88/cx88-video.c | 15 --------------- linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | 2 -- linux/drivers/media/video/cx88/cx88.h | 6 ------ linux/drivers/media/video/em28xx/em28xx-i2c.c | 2 -- linux/drivers/media/video/em28xx/em28xx-video.c | 8 -------- linux/drivers/media/video/ivtv/ivtv-i2c.c | 12 ++---------- linux/drivers/media/video/pwc/pwc-if.c | 15 --------------- linux/drivers/media/video/saa6588.c | 10 ---------- linux/drivers/media/video/saa7115.c | 2 -- linux/drivers/media/video/saa7134/saa6752hs.c | 4 ---- linux/drivers/media/video/saa7134/saa7134-alsa.c | 15 --------------- linux/drivers/media/video/saa7134/saa7134-core.c | 9 --------- linux/drivers/media/video/saa7134/saa7134-empress.c | 5 ----- linux/drivers/media/video/saa7134/saa7134-i2c.c | 2 -- linux/drivers/media/video/saa717x.c | 2 -- linux/drivers/media/video/tda7432.c | 5 ----- linux/drivers/media/video/tda9875.c | 5 ----- linux/drivers/media/video/tuner-core.c | 10 ---------- linux/drivers/media/video/tvaudio.c | 9 --------- linux/drivers/media/video/tvmixer.c | 14 -------------- linux/drivers/media/video/usbvision/usbvision-core.c | 20 -------------------- linux/drivers/media/video/usbvision/usbvision-i2c.c | 6 ------ linux/drivers/media/video/videobuf-dma-sg.c | 11 ----------- linux/drivers/media/video/videobuf-dvb.c | 4 ---- linux/drivers/media/video/vp27smpx.c | 3 --- linux/drivers/media/video/wm8739.c | 3 --- 37 files changed, 3 insertions(+), 282 deletions(-) (limited to 'linux/drivers/media/video') diff --git a/linux/drivers/media/video/bt8xx/bt832.c b/linux/drivers/media/video/bt8xx/bt832.c index fc884c935..53d219c7d 100644 --- a/linux/drivers/media/video/bt8xx/bt832.c +++ b/linux/drivers/media/video/bt8xx/bt832.c @@ -205,13 +205,8 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind) static int bt832_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, bt832_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, bt832_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c index 10a519642..4d283be22 100644 --- a/linux/drivers/media/video/bt8xx/bttv-cards.c +++ b/linux/drivers/media/video/bt8xx/bttv-cards.c @@ -115,22 +115,12 @@ module_param(gpiomask, int, 0444); module_param(audioall, int, 0444); module_param(autoload, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(card, int, dummy, 0444); -module_param_array(pll, int, dummy, 0444); -module_param_array(tuner, int, dummy, 0444); -module_param_array(svhs, int, dummy, 0444); -module_param_array(remote, int, dummy, 0444); -module_param_array(audiomux, int, dummy, 0444); -#else module_param_array(card, int, NULL, 0444); module_param_array(pll, int, NULL, 0444); module_param_array(tuner, int, NULL, 0444); module_param_array(svhs, int, NULL, 0444); module_param_array(remote, int, NULL, 0444); module_param_array(audiomux, int, NULL, 0444); -#endif MODULE_PARM_DESC(triton1,"set ETBF pci config bit " "[enable bug compatibility for triton1 + others]"); diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c index 33db080bb..d63ca727f 100644 --- a/linux/drivers/media/video/bt8xx/bttv-driver.c +++ b/linux/drivers/media/video/bt8xx/bttv-driver.c @@ -130,12 +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,6,10) -static int dummy; -module_param_array(radio, int, dummy, 0444); -#else module_param_array(radio, int, NULL, 0444); -#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"); @@ -4376,11 +4371,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; @@ -4587,11 +4578,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; @@ -4626,11 +4613,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); diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c index e0c52aa27..4f48dfb26 100644 --- a/linux/drivers/media/video/bt8xx/bttv-i2c.c +++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c @@ -421,9 +421,7 @@ int __devinit init_bttv_i2c(struct bttv *btv) btv->c.i2c_adap.algo_data = &btv->i2c_algo; } btv->c.i2c_adap.owner = THIS_MODULE; -#ifdef I2C_CLASS_TV_ANALOG btv->c.i2c_adap.class = I2C_CLASS_TV_ANALOG; -#endif btv->c.i2c_adap.client_register = attach_inform; btv->c.i2c_adap.dev.parent = &btv->c.pci->dev; @@ -434,12 +432,10 @@ int __devinit init_bttv_i2c(struct bttv *btv) i2c_set_adapdata(&btv->c.i2c_adap, btv); btv->i2c_client.adapter = &btv->c.i2c_adap; -#ifdef I2C_CLASS_TV_ANALOG if (bttv_tvcards[btv->c.type].no_video) btv->c.i2c_adap.class &= ~I2C_CLASS_TV_ANALOG; if (bttv_tvcards[btv->c.type].has_dvb) btv->c.i2c_adap.class |= I2C_CLASS_TV_DIGITAL; -#endif if (btv->use_i2c_hw) { btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap); diff --git a/linux/drivers/media/video/bt8xx/bttvp.h b/linux/drivers/media/video/bt8xx/bttvp.h index 96679f533..c3d1703ac 100644 --- a/linux/drivers/media/video/bt8xx/bttvp.h +++ b/linux/drivers/media/video/bt8xx/bttvp.h @@ -308,9 +308,6 @@ struct bttv_input { }; struct bttv_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif u32 gpio_enable; u32 gpio_data; int disabled; diff --git a/linux/drivers/media/video/cx18/cx18-i2c.c b/linux/drivers/media/video/cx18/cx18-i2c.c index f6b7289db..64a259405 100644 --- a/linux/drivers/media/video/cx18/cx18-i2c.c +++ b/linux/drivers/media/video/cx18/cx18-i2c.c @@ -39,10 +39,6 @@ #define GETSCL_BIT 0x0004 #define GETSDL_BIT 0x0008 -#ifndef I2C_ADAP_CLASS_TV_ANALOG -#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG -#endif - #define CX18_CS5345_I2C_ADDR 0x4c /* This array should match the CX18_HW_ defines */ @@ -234,9 +230,7 @@ static struct i2c_adapter cx18_i2c_adap_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/cx23885/cx23885-video.c b/linux/drivers/media/video/cx23885/cx23885-video.c index 1e1588bee..a34f83052 100644 --- a/linux/drivers/media/video/cx23885/cx23885-video.c +++ b/linux/drivers/media/video/cx23885/cx23885-video.c @@ -50,16 +50,9 @@ static unsigned int video_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX23885_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -static unsigned int dummy; -module_param_array(video_nr, int, dummy, 0444); -module_param_array(vbi_nr, int, dummy, 0444); -module_param_array(radio_nr, int, dummy, 0444); -#else module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); -#endif MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); diff --git a/linux/drivers/media/video/cx88/cx88-alsa.c b/linux/drivers/media/video/cx88/cx88-alsa.c index a8e985b6f..c675cbeae 100644 --- a/linux/drivers/media/video/cx88/cx88-alsa.c +++ b/linux/drivers/media/video/cx88/cx88-alsa.c @@ -98,10 +98,6 @@ struct cx88_audio_dev { typedef struct cx88_audio_dev snd_cx88_card_t; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8) -#define chip_t snd_cx88_card_t -#endif - #ifdef COMPAT_SND_CTL_BOOLEAN_MONO static int snd_ctl_boolean_mono_info(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_info *uinfo) @@ -122,19 +118,10 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static unsigned int dummy; -module_param_array(enable, bool, dummy, 0444); -#else module_param_array(enable, bool, NULL, 0444); -#endif MODULE_PARM_DESC(enable, "Enable cx88x soundcard. default enabled."); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -module_param_array(index, int, dummy, 0444); -#else module_param_array(index, int, NULL, 0444); -#endif MODULE_PARM_DESC(index, "Index value for cx88x capture interface(s)."); diff --git a/linux/drivers/media/video/cx88/cx88-cards.c b/linux/drivers/media/video/cx88/cx88-cards.c index e8932ddf1..9329dbf6a 100644 --- a/linux/drivers/media/video/cx88/cx88-cards.c +++ b/linux/drivers/media/video/cx88/cx88-cards.c @@ -33,16 +33,9 @@ static unsigned int tuner[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int card[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(tuner, int, dummy, 0444); -module_param_array(radio, int, dummy, 0444); -module_param_array(card, int, dummy, 0444); -#else module_param_array(tuner, int, NULL, 0444); module_param_array(radio, int, NULL, 0444); module_param_array(card, int, NULL, 0444); -#endif MODULE_PARM_DESC(tuner,"tuner type"); MODULE_PARM_DESC(radio,"radio tuner type"); diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 0f8ca620b..df615f19a 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -184,14 +184,10 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) memcpy(&core->i2c_algo, &cx8800_i2c_algo_template, sizeof(core->i2c_algo)); -#ifdef I2C_CLASS_TV_ANALOG if (core->board.tuner_type != TUNER_ABSENT) core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; -#endif -#ifdef I2C_CLASS_TV_DIGITAL if (core->board.mpeg & CX88_MPEG_DVB) core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; -#endif core->i2c_adap.dev.parent = &pci->dev; strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); diff --git a/linux/drivers/media/video/cx88/cx88-mpeg.c b/linux/drivers/media/video/cx88/cx88-mpeg.c index b95f6804f..4af6604ec 100644 --- a/linux/drivers/media/video/cx88/cx88-mpeg.c +++ b/linux/drivers/media/video/cx88/cx88-mpeg.c @@ -566,11 +566,7 @@ static int cx8802_suspend_common(struct pci_dev *pci_dev, pm_message_t state) cx88_shutdown(dev->core); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_save_state(pci_dev, dev->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); dev->state.disabled = 1; @@ -602,11 +598,7 @@ static int cx8802_resume_common(struct pci_dev *pci_dev) return err; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_restore_state(pci_dev, dev->state.pci_cfg); -#else pci_restore_state(pci_dev); -#endif #if 1 /* FIXME: re-initialize hardware */ diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c index 786800e1a..fe58a1f14 100644 --- a/linux/drivers/media/video/cx88/cx88-video.c +++ b/linux/drivers/media/video/cx88/cx88-video.c @@ -56,16 +56,9 @@ static unsigned int video_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (CX88_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static unsigned int dummy; -module_param_array(video_nr, int, dummy, 0444); -module_param_array(vbi_nr, int, dummy, 0444); -module_param_array(radio_nr, int, dummy, 0444); -#else module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); -#endif MODULE_PARM_DESC(video_nr,"video device numbers"); MODULE_PARM_DESC(vbi_nr,"vbi device numbers"); @@ -2290,11 +2283,7 @@ static int cx8800_suspend(struct pci_dev *pci_dev, pm_message_t state) cx88_shutdown(core); #endif -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_save_state(pci_dev, dev->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); dev->state.disabled = 1; @@ -2326,11 +2315,7 @@ static int cx8800_resume(struct pci_dev *pci_dev) return err; } -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - pci_restore_state(pci_dev, dev->state.pci_cfg); -#else pci_restore_state(pci_dev); -#endif #if 1 /* FIXME: re-initialize hardware */ diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index 4dbe81282..20800425c 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -120,9 +120,7 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template, sizeof(vp3054_i2c->algo)); -#ifdef I2C_CLASS_TV_DIGITAL vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL; -#endif vp3054_i2c->adap.dev.parent = &dev->pci->dev; strlcpy(vp3054_i2c->adap.name, core->name, diff --git a/linux/drivers/media/video/cx88/cx88.h b/linux/drivers/media/video/cx88/cx88.h index 4222f919e..161b3cc13 100644 --- a/linux/drivers/media/video/cx88/cx88.h +++ b/linux/drivers/media/video/cx88/cx88.h @@ -386,9 +386,6 @@ struct cx8800_fh { }; struct cx8800_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif int disabled; }; @@ -445,9 +442,6 @@ struct cx8802_fh { }; struct cx8802_suspend_state { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - u32 pci_cfg[64 / sizeof(u32)]; -#endif int disabled; }; diff --git a/linux/drivers/media/video/em28xx/em28xx-i2c.c b/linux/drivers/media/video/em28xx/em28xx-i2c.c index c22e73019..8344e87ce 100644 --- a/linux/drivers/media/video/em28xx/em28xx-i2c.c +++ b/linux/drivers/media/video/em28xx/em28xx-i2c.c @@ -527,9 +527,7 @@ static struct i2c_adapter em28xx_adap_template = { .inc_use = inc_use, .dec_use = dec_use, #endif -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif .name = "em28xx", .id = I2C_HW_B_EM28XX, .algo = &em28xx_algo, diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index b3eb14501..098acbd32 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -80,18 +80,10 @@ static unsigned int video_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int vbi_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; static unsigned int radio_nr[] = {[0 ... (EM28XX_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 10) -static int dummy; -module_param_array(card, int, dummy, 0444); -module_param_array(video_nr, int, dummy, 0444); -module_param_array(vbi_nr, int, dummy, 0444); -module_param_array(radio_nr, int, dummy, 0444); -#else module_param_array(card, int, NULL, 0444); module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); -#endif MODULE_PARM_DESC(card, "card type"); MODULE_PARM_DESC(video_nr, "video device numbers"); MODULE_PARM_DESC(vbi_nr, "vbi device numbers"); diff --git a/linux/drivers/media/video/ivtv/ivtv-i2c.c b/linux/drivers/media/video/ivtv/ivtv-i2c.c index b9e38c849..3446ab458 100644 --- a/linux/drivers/media/video/ivtv/ivtv-i2c.c +++ b/linux/drivers/media/video/ivtv/ivtv-i2c.c @@ -75,10 +75,6 @@ #define IVTV_REG_I2C_GETSCL_OFFSET 0x7008 #define IVTV_REG_I2C_GETSDA_OFFSET 0x700c -#ifndef I2C_ADAP_CLASS_TV_ANALOG -#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG -#endif /* I2C_ADAP_CLASS_TV_ANALOG */ - #define IVTV_CS53L32A_I2C_ADDR 0x11 #define IVTV_M52790_I2C_ADDR 0x48 #define IVTV_CX25840_I2C_ADDR 0x44 @@ -564,9 +560,7 @@ static struct i2c_adapter ivtv_i2c_adap_hw_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; @@ -622,9 +616,7 @@ static struct i2c_adapter ivtv_i2c_adap_template = { .client_unregister = detach_inform, .owner = THIS_MODULE, #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22) -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#endif + .class = I2C_CLASS_TV_ANALOG, #endif }; diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c index 8236b2b2d..0ac103a8c 100644 --- a/linux/drivers/media/video/pwc/pwc-if.c +++ b/linux/drivers/media/video/pwc/pwc-if.c @@ -830,13 +830,9 @@ int pwc_isoc_init(struct pwc_device *pdev) /* Get the current alternate interface, adjust packet size */ if (!udev->actconfig) return -EFAULT; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) - idesc = &udev->actconfig->interface[0]->altsetting[pdev->valternate]; -#else intf = usb_ifnum_to_if(udev, 0); if (intf) idesc = usb_altnum_to_altsetting(intf, pdev->valternate); -#endif if (!idesc) return -EFAULT; @@ -1472,15 +1468,9 @@ static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma) pos += (unsigned long)pdev->image_data; while (size > 0) { -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) - page = kvirt_to_pa(pos); - if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) - return -EAGAIN; -#else page = vmalloc_to_pfn((void *)pos); if (remap_pfn_range(vma, start, page, PAGE_SIZE, PAGE_SHARED)) return -EAGAIN; -#endif start += PAGE_SIZE; pos += PAGE_SIZE; if (size > PAGE_SIZE) @@ -1943,13 +1933,8 @@ module_param_named(trace, pwc_trace, int, 0644); #endif module_param(power_save, int, 0444); module_param(compression, int, 0444); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -module_param_array(leds, int, leds_nargs, 0444); -module_param_array(dev_hint, charp, dev_hint_nargs, 0444); -#else module_param_array(leds, int, &leds_nargs, 0444); module_param_array(dev_hint, charp, &dev_hint_nargs, 0444); -#endif MODULE_PARM_DESC(size, "Initial image size. One of sqcif, qsif, qcif, sif, cif, vga"); MODULE_PARM_DESC(fps, "Initial frames per second. Varies with model, useful range 5-30"); diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c index 514c2d600..6b5e3b5b2 100644 --- a/linux/drivers/media/video/saa6588.c +++ b/linux/drivers/media/video/saa6588.c @@ -445,18 +445,8 @@ static int saa6588_attach(struct i2c_adapter *adap, int addr, int kind) static int saa6588_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, saa6588_attach); -#else - switch (adap->id) { - case I2C_HW_B_BT848: - case I2C_HW_B_RIVA: - case I2C_HW_SAA7134: - return i2c_probe(adap, &addr_data, saa6588_attach); - break; - } -#endif return 0; } diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c index be03921f7..0275def5b 100644 --- a/linux/drivers/media/video/saa7115.c +++ b/linux/drivers/media/video/saa7115.c @@ -1588,9 +1588,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = saa7115_command, .probe = saa7115_probe, .remove = saa7115_remove, -#ifdef I2C_CLASS_TV_ANALOG .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = saa7115_id, #endif diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c index 21b36c993..9e0e9f7b2 100644 --- a/linux/drivers/media/video/saa7134/saa6752hs.c +++ b/linux/drivers/media/video/saa7134/saa6752hs.c @@ -715,12 +715,8 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind) static int saa6752hs_probe(struct i2c_adapter *adap) { -#if I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, saa6752hs_attach); -#else - return i2c_probe(adap, &addr_data, saa6752hs_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index 900be78e3..6293eba34 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -16,7 +16,6 @@ * */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) #include #include #include @@ -52,14 +51,8 @@ static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ static int enable[SNDRV_CARDS] = {1, [1 ... (SNDRV_CARDS - 1)] = 1}; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(index, int, dummy, 0444); -module_param_array(enable, int, dummy, 0444); -#else module_param_array(index, int, NULL, 0444); module_param_array(enable, int, NULL, 0444); -#endif MODULE_PARM_DESC(index, "Index value for SAA7134 capture interface(s)."); MODULE_PARM_DESC(enable, "Enable (or not) the SAA7134 capture interface(s)."); @@ -88,10 +81,6 @@ typedef struct snd_card_saa7134 { } snd_card_saa7134_t; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,8) -#define chip_t snd_card_saa7134_t -#endif - /* * PCM structure */ @@ -1136,7 +1125,3 @@ late_initcall(saa7134_alsa_init); module_exit(saa7134_alsa_exit); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Ricardo Cerqueira"); - - -#endif /* LINUX_VERSION_CODE */ - diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 88a10fbd5..511941bca 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -80,20 +80,11 @@ static unsigned int tuner[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; static unsigned int card[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(video_nr, int, dummy, 0444); -module_param_array(vbi_nr, int, dummy, 0444); -module_param_array(radio_nr, int, dummy, 0444); -module_param_array(tuner, int, dummy, 0444); -module_param_array(card, int, dummy, 0444); -#else module_param_array(video_nr, int, NULL, 0444); module_param_array(vbi_nr, int, NULL, 0444); module_param_array(radio_nr, int, NULL, 0444); module_param_array(tuner, int, NULL, 0444); module_param_array(card, int, NULL, 0444); -#endif MODULE_PARM_DESC(video_nr, "video device number"); MODULE_PARM_DESC(vbi_nr, "vbi device number"); diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c index cb74ac0c5..d4afbce9d 100644 --- a/linux/drivers/media/video/saa7134/saa7134-empress.c +++ b/linux/drivers/media/video/saa7134/saa7134-empress.c @@ -37,12 +37,7 @@ MODULE_LICENSE("GPL"); static unsigned int empress_nr[] = {[0 ... (SAA7134_MAXBOARDS - 1)] = UNSET }; -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static int dummy; -module_param_array(empress_nr, int, dummy, 0444); -#else module_param_array(empress_nr, int, NULL, 0444); -#endif MODULE_PARM_DESC(empress_nr,"ts device number"); static unsigned int debug; diff --git a/linux/drivers/media/video/saa7134/saa7134-i2c.c b/linux/drivers/media/video/saa7134/saa7134-i2c.c index 9f94def45..610e506b5 100644 --- a/linux/drivers/media/video/saa7134/saa7134-i2c.c +++ b/linux/drivers/media/video/saa7134/saa7134-i2c.c @@ -369,9 +369,7 @@ static struct i2c_algorithm saa7134_algo = { static struct i2c_adapter saa7134_adap_template = { .owner = THIS_MODULE, -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif .name = "saa7134", .id = I2C_HW_SAA7134, .algo = &saa7134_algo, diff --git a/linux/drivers/media/video/saa717x.c b/linux/drivers/media/video/saa717x.c index 38d4707c5..6f9f90cc6 100644 --- a/linux/drivers/media/video/saa717x.c +++ b/linux/drivers/media/video/saa717x.c @@ -1531,9 +1531,7 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = saa717x_command, .probe = saa717x_probe, .remove = saa717x_remove, -#ifdef I2C_CLASS_TV_ANALOG .legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = saa717x_id, #endif diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c index f873e3256..265a09690 100644 --- a/linux/drivers/media/video/tda7432.c +++ b/linux/drivers/media/video/tda7432.c @@ -334,13 +334,8 @@ static int tda7432_attach(struct i2c_adapter *adap, int addr, int kind) static int tda7432_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, tda7432_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, tda7432_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c index b32a34c4b..e1c7550d5 100644 --- a/linux/drivers/media/video/tda9875.c +++ b/linux/drivers/media/video/tda9875.c @@ -269,13 +269,8 @@ static int tda9875_attach(struct i2c_adapter *adap, int addr, int kind) static int tda9875_probe(struct i2c_adapter *adap) { -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return i2c_probe(adap, &addr_data, tda9875_attach); -#else - if (adap->id == I2C_HW_B_BT848) - return i2c_probe(adap, &addr_data, tda9875_attach); -#endif return 0; } diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c index 16d2df0d5..32554f1cf 100644 --- a/linux/drivers/media/video/tuner-core.c +++ b/linux/drivers/media/video/tuner-core.c @@ -166,14 +166,8 @@ module_param_named(debug,tuner_debug, int, 0644); module_param_string(pal, pal, sizeof(pal), 0644); module_param_string(secam, secam, sizeof(secam), 0644); module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,10) -static unsigned int dummy; -module_param_array(tv_range, int, dummy, 0644); -module_param_array(radio_range, int, dummy, 0644); -#else module_param_array(tv_range, int, NULL, 0644); module_param_array(radio_range, int, NULL, 0644); -#endif MODULE_DESCRIPTION("device driver for various TV and TV+FM radio tuners"); MODULE_AUTHOR("Ralph Metzler, Gerd Knorr, Gunther Mayer"); @@ -1265,11 +1259,7 @@ static int tuner_legacy_probe(struct i2c_adapter *adap) normal_i2c[1] = I2C_CLIENT_END; } -#ifdef I2C_CLASS_TV_ANALOG if ((adap->class & I2C_CLASS_TV_ANALOG) == 0) -#else - if (adap->id != I2C_HW_B_BT848) -#endif return 0; /* HACK: Ignore 0x6b and 0x6f on cx88 boards. diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c index 961736a11..b40ebd0a3 100644 --- a/linux/drivers/media/video/tvaudio.c +++ b/linux/drivers/media/video/tvaudio.c @@ -1843,17 +1843,8 @@ static int chip_legacy_probe(struct i2c_adapter *adap) because dedicated drivers are used */ if ((adap->id == I2C_HW_SAA7146)) return 0; -#ifdef I2C_CLASS_TV_ANALOG if (adap->class & I2C_CLASS_TV_ANALOG) return 1; -#else - switch (adap->id) { - case I2C_HW_B_BT848: - case I2C_HW_B_RIVA: - case I2C_HW_SAA7134: - return 1; - } -#endif return 0; } diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c index 43ec790d6..4260b833a 100644 --- a/linux/drivers/media/video/tvmixer.c +++ b/linux/drivers/media/video/tvmixer.c @@ -265,22 +265,8 @@ static int tvmixer_clients(struct i2c_client *client) struct video_audio va; int i,minor; -#ifdef I2C_CLASS_TV_ANALOG if (!(client->adapter->class & I2C_CLASS_TV_ANALOG)) return -1; -#else - /* TV card ??? */ - switch (client->adapter->id) { - case I2C_HW_SMBUS_VOODOO3: - case I2C_HW_B_BT848: - case I2C_HW_B_RIVA: - /* ok, have a look ... */ - break; - default: - /* ignore that one */ - return -1; - } -#endif /* unregister ?? */ for (i = 0; i < DEV_MAX; i++) { diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c index c5bc897e9..bf464540c 100644 --- a/linux/drivers/media/video/usbvision/usbvision-core.c +++ b/linux/drivers/media/video/usbvision/usbvision-core.c @@ -2570,7 +2570,6 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) return; /* Unschedule all of the iso td's */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,9) for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { usb_kill_urb(usbvision->sbuf[bufIdx].urb); if (usbvision->sbuf[bufIdx].data){ @@ -2582,25 +2581,6 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision) usb_free_urb(usbvision->sbuf[bufIdx].urb); usbvision->sbuf[bufIdx].urb = NULL; } -#else - for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) { - errCode = usb_unlink_urb(usbvision->sbuf[bufIdx].urb); - if (errCode < 0) - err("%s: usb_unlink_urb() failed: error %d", - __func__, errCode); - } - - if (usbvision->sbuf[bufIdx].data){ - usb_buffer_free(usbvision->dev, - sb_size, - usbvision->sbuf[bufIdx].data, - usbvision->sbuf[bufIdx].urb->transfer_dma); - } - /* Delete them all */ - for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) - usb_free_urb(usbvision->sbuf[bufIdx].urb); -#endif - PDEBUG(DBG_ISOC, "%s: streaming=Stream_Off\n", __func__); usbvision->streaming = Stream_Off; diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c index d6d12debc..e09d0bea5 100644 --- a/linux/drivers/media/video/usbvision/usbvision-i2c.c +++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c @@ -540,13 +540,7 @@ static struct i2c_adapter i2c_adap_template = { .id = I2C_HW_B_BT848, /* FIXME */ .client_register = attach_inform, .client_unregister = detach_inform, -#ifdef I2C_ADAP_CLASS_TV_ANALOG - .class = I2C_ADAP_CLASS_TV_ANALOG, -#else -#ifdef I2C_CLASS_TV_ANALOG .class = I2C_CLASS_TV_ANALOG, -#endif -#endif }; static struct i2c_client i2c_client_template = { diff --git a/linux/drivers/media/video/videobuf-dma-sg.c b/linux/drivers/media/video/videobuf-dma-sg.c index 22c3c93b2..39ae44bda 100644 --- a/linux/drivers/media/video/videobuf-dma-sg.c +++ b/linux/drivers/media/video/videobuf-dma-sg.c @@ -265,11 +265,7 @@ int videobuf_dma_sync(struct videobuf_queue *q, struct videobuf_dmabuf *dma) MAGIC_CHECK(dma->magic, MAGIC_DMABUF); BUG_ON(!dma->sglen); -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,5) - dma_sync_sg(q->dev, dma->sglist, dma->nr_pages, dma->direction); -#else dma_sync_sg_for_cpu(q->dev, dma->sglist, dma->nr_pages, dma->direction); -#endif return 0; } @@ -392,13 +388,8 @@ videobuf_vm_close(struct vm_area_struct *vma) */ #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 24) static struct page* -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,1) -videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, - int write_access) -#else videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, int *type) -#endif { struct page *page; @@ -410,10 +401,8 @@ videobuf_vm_nopage(struct vm_area_struct *vma, unsigned long vaddr, if (!page) return NOPAGE_OOM; clear_user_page(page_address(page), vaddr, page); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,1) if (type) *type = VM_FAULT_MINOR; -#endif return page; } #else diff --git a/linux/drivers/media/video/videobuf-dvb.c b/linux/drivers/media/video/videobuf-dvb.c index 9a821371a..918c4574e 100644 --- a/linux/drivers/media/video/videobuf-dvb.c +++ b/linux/drivers/media/video/videobuf-dvb.c @@ -13,8 +13,6 @@ * (at your option) any later version. */ -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0) - #include #include #include @@ -286,5 +284,3 @@ EXPORT_SYMBOL(videobuf_dvb_unregister); * compile-command: "make DVB=1" * End: */ -#endif /* LINUX_VERSION_CODE */ - diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index c368dfe84..e2d6d7a2c 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -179,9 +179,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = vp27smpx_command, .probe = vp27smpx_probe, .remove = vp27smpx_remove, -#ifndef I2C_CLASS_TV_ANALOG - .legacy_id = I2C_HW_B_CX2341X, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = vp27smpx_id, #endif diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c index 1eb8ef8a5..e2df9f80e 100644 --- a/linux/drivers/media/video/wm8739.c +++ b/linux/drivers/media/video/wm8739.c @@ -337,9 +337,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { .command = wm8739_command, .probe = wm8739_probe, .remove = wm8739_remove, -#ifndef I2C_CLASS_TV_ANALOG - .legacy_id = I2C_HW_B_CX2341X, -#endif #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) .id_table = wm8739_id, #endif -- cgit v1.2.3 From ea33affdbd8d71fab71e3f62845b9239d6f60ff8 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Tue, 8 Jul 2008 08:26:19 +0200 Subject: v4l-dvb: remove support for kernels < 2.6.13 From: Hans Verkuil Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil --- linux/drivers/media/video/au0828/au0828-dvb.c | 23 --------- linux/drivers/media/video/bt8xx/bt832.c | 3 -- linux/drivers/media/video/bt8xx/bttv-driver.c | 8 --- linux/drivers/media/video/compat_ioctl32.c | 2 - linux/drivers/media/video/cs5345.c | 4 -- linux/drivers/media/video/cs53l32a.c | 4 -- linux/drivers/media/video/cx18/cx18-streams.c | 2 - linux/drivers/media/video/cx23885/cx23885-video.c | 4 -- linux/drivers/media/video/cx25840/cx25840-core.c | 4 -- linux/drivers/media/video/cx88/cx88-video.c | 4 -- linux/drivers/media/video/em28xx/em28xx-dvb.c | 27 ---------- linux/drivers/media/video/em28xx/em28xx-i2c.c | 17 ------- linux/drivers/media/video/em28xx/em28xx-video.c | 4 -- linux/drivers/media/video/ivtv/ivtv-streams.c | 4 -- linux/drivers/media/video/m52790.c | 4 -- linux/drivers/media/video/msp3400-driver.c | 4 +- linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 6 --- .../drivers/media/video/pvrusb2/pvrusb2-i2c-core.c | 6 --- linux/drivers/media/video/pwc/pwc-if.c | 13 ----- linux/drivers/media/video/pwc/pwc-ioctl.h | 5 -- linux/drivers/media/video/saa5246a.c | 4 +- linux/drivers/media/video/saa5249.c | 4 +- linux/drivers/media/video/saa6588.c | 3 -- linux/drivers/media/video/saa7115.c | 4 -- linux/drivers/media/video/saa7127.c | 4 -- linux/drivers/media/video/saa7134/saa6752hs.c | 6 +-- linux/drivers/media/video/saa7134/saa7134-video.c | 4 -- linux/drivers/media/video/saa717x.c | 3 -- linux/drivers/media/video/tda7432.c | 4 +- linux/drivers/media/video/tda9840.c | 3 -- linux/drivers/media/video/tda9875.c | 4 +- linux/drivers/media/video/tea6415c.c | 3 -- linux/drivers/media/video/tea6420.c | 3 -- linux/drivers/media/video/tlv320aic23b.c | 4 -- linux/drivers/media/video/tuner-core.c | 3 -- linux/drivers/media/video/tvaudio.c | 5 -- linux/drivers/media/video/tvmixer.c | 8 --- linux/drivers/media/video/tvp5150.c | 5 -- linux/drivers/media/video/upd64031a.c | 4 -- linux/drivers/media/video/upd64083.c | 4 -- linux/drivers/media/video/usbvideo/konicawc.c | 4 +- .../media/video/usbvideo/quickcam_messenger.c | 2 +- .../drivers/media/video/usbvision/usbvision-i2c.c | 27 ---------- .../media/video/usbvision/usbvision-video.c | 6 --- linux/drivers/media/video/videobuf-dvb.c | 23 --------- linux/drivers/media/video/videodev.c | 59 ---------------------- linux/drivers/media/video/vivi.c | 2 - linux/drivers/media/video/vp27smpx.c | 4 -- linux/drivers/media/video/wm8739.c | 4 -- linux/drivers/media/video/wm8775.c | 4 -- 50 files changed, 8 insertions(+), 357 deletions(-) (limited to 'linux/drivers/media/video') 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 #include #include @@ -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 #include -#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 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) -#include #else -#include +#include #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 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18) #include -#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13) +#else #include #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; -- cgit v1.2.3