summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/drivers/media/dvb/bt8xx/bt878.c1
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c35
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c14
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_compat.c179
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_compat.h178
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c15
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_functions.c16
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_functions.h5
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c96
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.h4
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_usb_compat.h17
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c64
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.h7
-rw-r--r--linux/drivers/media/dvb/frontends/stv0299.c14
-rw-r--r--linux/drivers/media/dvb/frontends/ves1x93.c14
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c7
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_ir.c5
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c4
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c61
19 files changed, 12 insertions, 724 deletions
diff --git a/linux/drivers/media/dvb/bt8xx/bt878.c b/linux/drivers/media/dvb/bt8xx/bt878.c
index 1619f4c3f..fb2636f1f 100644
--- a/linux/drivers/media/dvb/bt8xx/bt878.c
+++ b/linux/drivers/media/dvb/bt8xx/bt878.c
@@ -27,7 +27,6 @@
*
*/
-#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 090fc25f5..77a37cfc9 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -179,40 +179,6 @@ static int __init dvb_bt8xx_card_match(unsigned int bttv_nr, char *card_name, u3
return 0;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-/* with 2.6.x not needed thanks to the driver model + sysfs */
-
-extern struct i2c_adapter *bttv_get_i2c_adap(unsigned int card);
-
-static void __init dvb_bt8xx_get_adaps(void)
-{
- struct dvb_bt8xx_card *card;
- struct list_head *entry, *entry_safe;
-
- list_for_each_safe(entry, entry_safe, &card_list) {
- card = list_entry(entry, struct dvb_bt8xx_card, list);
- card->i2c_adapter = bttv_get_i2c_adap(card->bttv_nr);
- if (!card->i2c_adapter) {
- printk("dvb_bt8xx: unable to determine i2c adaptor of card %d, deleting\n", card->bttv_nr);
-
- list_del(&card->list);
- kfree(card);
- }
- }
-}
-
-static void dvb_bt8xx_i2c_adap_free(struct i2c_adapter *adap)
-{
-}
-
-static void __exit dvb_bt8xx_exit_adaps(void)
-{
-}
-
-#else
-
-/* More complicated. but cleaner better */
-
static struct dvb_bt8xx_card *dvb_bt8xx_find_by_i2c_adap(struct i2c_adapter *adap)
{
struct dvb_bt8xx_card *card;
@@ -308,7 +274,6 @@ static void __exit dvb_bt8xx_exit_adaps(void)
{
i2c_del_driver(&dvb_bt8xx_driver);
}
-#endif
static int __init dvb_bt8xx_load_card( struct dvb_bt8xx_card *card)
{
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
index 0f8bfef80..106e4ab87 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_ca_en50221.c
@@ -1569,23 +1569,9 @@ int dvb_ca_en50221_init(struct dvb_adapter *dvb_adapter, struct dvb_ca_en50221*
mb();
/* create a kthread for monitoring this CA device */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- {
- /* bug in linux 2.4.x: kernel_thread() fails when the process calling
- * open() is run in the debugger (fixed in kernel 2.5). I hope this
- * workaround does not have any ugly side effects...
- */
- int pt = current->ptrace;
- current->ptrace = 0;
-#endif
ret = kernel_thread (dvb_ca_en50221_thread, ca, 0);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- current->ptrace = pt;
- }
-#endif
-
if (ret < 0) {
printk("dvb_ca_init: failed to start kernel_thread (%d)\n", ret);
goto error;
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.c b/linux/drivers/media/dvb/dvb-core/dvb_compat.c
deleted file mode 100644
index 27646be1b..000000000
--- a/linux/drivers/media/dvb/dvb-core/dvb_compat.c
+++ /dev/null
@@ -1,179 +0,0 @@
-#include <linux/slab.h>
-#include <linux/highmem.h>
-
-#include "dvb_compat.h"
-
-/**
- * compatibility crap for old kernels. No guarantee for a working driver
- * even when everything compiles.
- */
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-devfs_handle_t dvb_devfs_handle;
-EXPORT_SYMBOL(dvb_devfs_handle);
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-static
-u32 crc32_table[256] = {
- 0x00000000, 0x04c11db7, 0x09823b6e, 0x0d4326d9, 0x130476dc, 0x17c56b6b,
- 0x1a864db2, 0x1e475005, 0x2608edb8, 0x22c9f00f, 0x2f8ad6d6, 0x2b4bcb61,
- 0x350c9b64, 0x31cd86d3, 0x3c8ea00a, 0x384fbdbd, 0x4c11db70, 0x48d0c6c7,
- 0x4593e01e, 0x4152fda9, 0x5f15adac, 0x5bd4b01b, 0x569796c2, 0x52568b75,
- 0x6a1936c8, 0x6ed82b7f, 0x639b0da6, 0x675a1011, 0x791d4014, 0x7ddc5da3,
- 0x709f7b7a, 0x745e66cd, 0x9823b6e0, 0x9ce2ab57, 0x91a18d8e, 0x95609039,
- 0x8b27c03c, 0x8fe6dd8b, 0x82a5fb52, 0x8664e6e5, 0xbe2b5b58, 0xbaea46ef,
- 0xb7a96036, 0xb3687d81, 0xad2f2d84, 0xa9ee3033, 0xa4ad16ea, 0xa06c0b5d,
- 0xd4326d90, 0xd0f37027, 0xddb056fe, 0xd9714b49, 0xc7361b4c, 0xc3f706fb,
- 0xceb42022, 0xca753d95, 0xf23a8028, 0xf6fb9d9f, 0xfbb8bb46, 0xff79a6f1,
- 0xe13ef6f4, 0xe5ffeb43, 0xe8bccd9a, 0xec7dd02d, 0x34867077, 0x30476dc0,
- 0x3d044b19, 0x39c556ae, 0x278206ab, 0x23431b1c, 0x2e003dc5, 0x2ac12072,
- 0x128e9dcf, 0x164f8078, 0x1b0ca6a1, 0x1fcdbb16, 0x018aeb13, 0x054bf6a4,
- 0x0808d07d, 0x0cc9cdca, 0x7897ab07, 0x7c56b6b0, 0x71159069, 0x75d48dde,
- 0x6b93dddb, 0x6f52c06c, 0x6211e6b5, 0x66d0fb02, 0x5e9f46bf, 0x5a5e5b08,
- 0x571d7dd1, 0x53dc6066, 0x4d9b3063, 0x495a2dd4, 0x44190b0d, 0x40d816ba,
- 0xaca5c697, 0xa864db20, 0xa527fdf9, 0xa1e6e04e, 0xbfa1b04b, 0xbb60adfc,
- 0xb6238b25, 0xb2e29692, 0x8aad2b2f, 0x8e6c3698, 0x832f1041, 0x87ee0df6,
- 0x99a95df3, 0x9d684044, 0x902b669d, 0x94ea7b2a, 0xe0b41de7, 0xe4750050,
- 0xe9362689, 0xedf73b3e, 0xf3b06b3b, 0xf771768c, 0xfa325055, 0xfef34de2,
- 0xc6bcf05f, 0xc27dede8, 0xcf3ecb31, 0xcbffd686, 0xd5b88683, 0xd1799b34,
- 0xdc3abded, 0xd8fba05a, 0x690ce0ee, 0x6dcdfd59, 0x608edb80, 0x644fc637,
- 0x7a089632, 0x7ec98b85, 0x738aad5c, 0x774bb0eb, 0x4f040d56, 0x4bc510e1,
- 0x46863638, 0x42472b8f, 0x5c007b8a, 0x58c1663d, 0x558240e4, 0x51435d53,
- 0x251d3b9e, 0x21dc2629, 0x2c9f00f0, 0x285e1d47, 0x36194d42, 0x32d850f5,
- 0x3f9b762c, 0x3b5a6b9b, 0x0315d626, 0x07d4cb91, 0x0a97ed48, 0x0e56f0ff,
- 0x1011a0fa, 0x14d0bd4d, 0x19939b94, 0x1d528623, 0xf12f560e, 0xf5ee4bb9,
- 0xf8ad6d60, 0xfc6c70d7, 0xe22b20d2, 0xe6ea3d65, 0xeba91bbc, 0xef68060b,
- 0xd727bbb6, 0xd3e6a601, 0xdea580d8, 0xda649d6f, 0xc423cd6a, 0xc0e2d0dd,
- 0xcda1f604, 0xc960ebb3, 0xbd3e8d7e, 0xb9ff90c9, 0xb4bcb610, 0xb07daba7,
- 0xae3afba2, 0xaafbe615, 0xa7b8c0cc, 0xa379dd7b, 0x9b3660c6, 0x9ff77d71,
- 0x92b45ba8, 0x9675461f, 0x8832161a, 0x8cf30bad, 0x81b02d74, 0x857130c3,
- 0x5d8a9099, 0x594b8d2e, 0x5408abf7, 0x50c9b640, 0x4e8ee645, 0x4a4ffbf2,
- 0x470cdd2b, 0x43cdc09c, 0x7b827d21, 0x7f436096, 0x7200464f, 0x76c15bf8,
- 0x68860bfd, 0x6c47164a, 0x61043093, 0x65c52d24, 0x119b4be9, 0x155a565e,
- 0x18197087, 0x1cd86d30, 0x029f3d35, 0x065e2082, 0x0b1d065b, 0x0fdc1bec,
- 0x3793a651, 0x3352bbe6, 0x3e119d3f, 0x3ad08088, 0x2497d08d, 0x2056cd3a,
- 0x2d15ebe3, 0x29d4f654, 0xc5a92679, 0xc1683bce, 0xcc2b1d17, 0xc8ea00a0,
- 0xd6ad50a5, 0xd26c4d12, 0xdf2f6bcb, 0xdbee767c, 0xe3a1cbc1, 0xe760d676,
- 0xea23f0af, 0xeee2ed18, 0xf0a5bd1d, 0xf464a0aa, 0xf9278673, 0xfde69bc4,
- 0x89b8fd09, 0x8d79e0be, 0x803ac667, 0x84fbdbd0, 0x9abc8bd5, 0x9e7d9662,
- 0x933eb0bb, 0x97ffad0c, 0xafb010b1, 0xab710d06, 0xa6322bdf, 0xa2f33668,
- 0xbcb4666d, 0xb8757bda, 0xb5365d03, 0xb1f740b4};
-
-u32 crc32_be (u32 crc, unsigned char const *data, size_t len)
-{
- int i;
-
- for (i=0; i<len; i++)
- crc = (crc << 8) ^ crc32_table[((crc >> 24) ^ *data++) & 0xff];
-
- return crc;
-}
-EXPORT_SYMBOL(crc32_be);
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22))
-
-#define tole(x) __constant_cpu_to_le32(x)
-
-static const u32 crc32table_le[] = {
-tole(0x00000000L), tole(0x77073096L), tole(0xee0e612cL), tole(0x990951baL),
-tole(0x076dc419L), tole(0x706af48fL), tole(0xe963a535L), tole(0x9e6495a3L),
-tole(0x0edb8832L), tole(0x79dcb8a4L), tole(0xe0d5e91eL), tole(0x97d2d988L),
-tole(0x09b64c2bL), tole(0x7eb17cbdL), tole(0xe7b82d07L), tole(0x90bf1d91L),
-tole(0x1db71064L), tole(0x6ab020f2L), tole(0xf3b97148L), tole(0x84be41deL),
-tole(0x1adad47dL), tole(0x6ddde4ebL), tole(0xf4d4b551L), tole(0x83d385c7L),
-tole(0x136c9856L), tole(0x646ba8c0L), tole(0xfd62f97aL), tole(0x8a65c9ecL),
-tole(0x14015c4fL), tole(0x63066cd9L), tole(0xfa0f3d63L), tole(0x8d080df5L),
-tole(0x3b6e20c8L), tole(0x4c69105eL), tole(0xd56041e4L), tole(0xa2677172L),
-tole(0x3c03e4d1L), tole(0x4b04d447L), tole(0xd20d85fdL), tole(0xa50ab56bL),
-tole(0x35b5a8faL), tole(0x42b2986cL), tole(0xdbbbc9d6L), tole(0xacbcf940L),
-tole(0x32d86ce3L), tole(0x45df5c75L), tole(0xdcd60dcfL), tole(0xabd13d59L),
-tole(0x26d930acL), tole(0x51de003aL), tole(0xc8d75180L), tole(0xbfd06116L),
-tole(0x21b4f4b5L), tole(0x56b3c423L), tole(0xcfba9599L), tole(0xb8bda50fL),
-tole(0x2802b89eL), tole(0x5f058808L), tole(0xc60cd9b2L), tole(0xb10be924L),
-tole(0x2f6f7c87L), tole(0x58684c11L), tole(0xc1611dabL), tole(0xb6662d3dL),
-tole(0x76dc4190L), tole(0x01db7106L), tole(0x98d220bcL), tole(0xefd5102aL),
-tole(0x71b18589L), tole(0x06b6b51fL), tole(0x9fbfe4a5L), tole(0xe8b8d433L),
-tole(0x7807c9a2L), tole(0x0f00f934L), tole(0x9609a88eL), tole(0xe10e9818L),
-tole(0x7f6a0dbbL), tole(0x086d3d2dL), tole(0x91646c97L), tole(0xe6635c01L),
-tole(0x6b6b51f4L), tole(0x1c6c6162L), tole(0x856530d8L), tole(0xf262004eL),
-tole(0x6c0695edL), tole(0x1b01a57bL), tole(0x8208f4c1L), tole(0xf50fc457L),
-tole(0x65b0d9c6L), tole(0x12b7e950L), tole(0x8bbeb8eaL), tole(0xfcb9887cL),
-tole(0x62dd1ddfL), tole(0x15da2d49L), tole(0x8cd37cf3L), tole(0xfbd44c65L),
-tole(0x4db26158L), tole(0x3ab551ceL), tole(0xa3bc0074L), tole(0xd4bb30e2L),
-tole(0x4adfa541L), tole(0x3dd895d7L), tole(0xa4d1c46dL), tole(0xd3d6f4fbL),
-tole(0x4369e96aL), tole(0x346ed9fcL), tole(0xad678846L), tole(0xda60b8d0L),
-tole(0x44042d73L), tole(0x33031de5L), tole(0xaa0a4c5fL), tole(0xdd0d7cc9L),
-tole(0x5005713cL), tole(0x270241aaL), tole(0xbe0b1010L), tole(0xc90c2086L),
-tole(0x5768b525L), tole(0x206f85b3L), tole(0xb966d409L), tole(0xce61e49fL),
-tole(0x5edef90eL), tole(0x29d9c998L), tole(0xb0d09822L), tole(0xc7d7a8b4L),
-tole(0x59b33d17L), tole(0x2eb40d81L), tole(0xb7bd5c3bL), tole(0xc0ba6cadL),
-tole(0xedb88320L), tole(0x9abfb3b6L), tole(0x03b6e20cL), tole(0x74b1d29aL),
-tole(0xead54739L), tole(0x9dd277afL), tole(0x04db2615L), tole(0x73dc1683L),
-tole(0xe3630b12L), tole(0x94643b84L), tole(0x0d6d6a3eL), tole(0x7a6a5aa8L),
-tole(0xe40ecf0bL), tole(0x9309ff9dL), tole(0x0a00ae27L), tole(0x7d079eb1L),
-tole(0xf00f9344L), tole(0x8708a3d2L), tole(0x1e01f268L), tole(0x6906c2feL),
-tole(0xf762575dL), tole(0x806567cbL), tole(0x196c3671L), tole(0x6e6b06e7L),
-tole(0xfed41b76L), tole(0x89d32be0L), tole(0x10da7a5aL), tole(0x67dd4accL),
-tole(0xf9b9df6fL), tole(0x8ebeeff9L), tole(0x17b7be43L), tole(0x60b08ed5L),
-tole(0xd6d6a3e8L), tole(0xa1d1937eL), tole(0x38d8c2c4L), tole(0x4fdff252L),
-tole(0xd1bb67f1L), tole(0xa6bc5767L), tole(0x3fb506ddL), tole(0x48b2364bL),
-tole(0xd80d2bdaL), tole(0xaf0a1b4cL), tole(0x36034af6L), tole(0x41047a60L),
-tole(0xdf60efc3L), tole(0xa867df55L), tole(0x316e8eefL), tole(0x4669be79L),
-tole(0xcb61b38cL), tole(0xbc66831aL), tole(0x256fd2a0L), tole(0x5268e236L),
-tole(0xcc0c7795L), tole(0xbb0b4703L), tole(0x220216b9L), tole(0x5505262fL),
-tole(0xc5ba3bbeL), tole(0xb2bd0b28L), tole(0x2bb45a92L), tole(0x5cb36a04L),
-tole(0xc2d7ffa7L), tole(0xb5d0cf31L), tole(0x2cd99e8bL), tole(0x5bdeae1dL),
-tole(0x9b64c2b0L), tole(0xec63f226L), tole(0x756aa39cL), tole(0x026d930aL),
-tole(0x9c0906a9L), tole(0xeb0e363fL), tole(0x72076785L), tole(0x05005713L),
-tole(0x95bf4a82L), tole(0xe2b87a14L), tole(0x7bb12baeL), tole(0x0cb61b38L),
-tole(0x92d28e9bL), tole(0xe5d5be0dL), tole(0x7cdcefb7L), tole(0x0bdbdf21L),
-tole(0x86d3d2d4L), tole(0xf1d4e242L), tole(0x68ddb3f8L), tole(0x1fda836eL),
-tole(0x81be16cdL), tole(0xf6b9265bL), tole(0x6fb077e1L), tole(0x18b74777L),
-tole(0x88085ae6L), tole(0xff0f6a70L), tole(0x66063bcaL), tole(0x11010b5cL),
-tole(0x8f659effL), tole(0xf862ae69L), tole(0x616bffd3L), tole(0x166ccf45L),
-tole(0xa00ae278L), tole(0xd70dd2eeL), tole(0x4e048354L), tole(0x3903b3c2L),
-tole(0xa7672661L), tole(0xd06016f7L), tole(0x4969474dL), tole(0x3e6e77dbL),
-tole(0xaed16a4aL), tole(0xd9d65adcL), tole(0x40df0b66L), tole(0x37d83bf0L),
-tole(0xa9bcae53L), tole(0xdebb9ec5L), tole(0x47b2cf7fL), tole(0x30b5ffe9L),
-tole(0xbdbdf21cL), tole(0xcabac28aL), tole(0x53b39330L), tole(0x24b4a3a6L),
-tole(0xbad03605L), tole(0xcdd70693L), tole(0x54de5729L), tole(0x23d967bfL),
-tole(0xb3667a2eL), tole(0xc4614ab8L), tole(0x5d681b02L), tole(0x2a6f2b94L),
-tole(0xb40bbe37L), tole(0xc30c8ea1L), tole(0x5a05df1bL), tole(0x2d02ef8dL)
-};
-
-u32 crc32_le(u32 crc, unsigned char const *p, size_t len)
-{
- while (len--) {
- crc = (crc >> 8) ^ crc32table_le[(crc ^ *p++) & 255];
- }
- return crc;
-}
-
-EXPORT_SYMBOL(crc32_le);
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
-struct page * vmalloc_to_page(void *vmalloc_addr)
-{
- unsigned long addr = (unsigned long) vmalloc_addr;
- struct page *page = NULL;
- pgd_t *pgd = pgd_offset_k(addr);
- pmd_t *pmd;
- pte_t *ptep, pte;
-
- if (!pgd_none(*pgd)) {
- pmd = pmd_offset(pgd, addr);
- if (!pmd_none(*pmd)) {
- ptep = pte_offset(pmd, addr);
- pte = *ptep;
- if (pte_present(pte))
- page = pte_page(pte);
- }
- }
- return page;
-}
-EXPORT_SYMBOL(vmalloc_to_page);
-#endif
-
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_compat.h b/linux/drivers/media/dvb/dvb-core/dvb_compat.h
deleted file mode 100644
index 25f945c20..000000000
--- a/linux/drivers/media/dvb/dvb-core/dvb_compat.h
+++ /dev/null
@@ -1,178 +0,0 @@
-#ifndef __CRAP_H
-#define __CRAP_H
-
-#ifndef I2C_ADAP_CLASS_TV_DIGITAL
-#define I2C_ADAP_CLASS_TV_DIGITAL 0
-#endif
-
-#include <asm/uaccess.h>
-#include <linux/string.h>
-#include <linux/smp_lock.h>
-#include <linux/version.h>
-#include <linux/fs.h>
-#include <linux/devfs_fs_kernel.h>
-
-#ifndef wait_event_interruptible_timeout
-#define __wait_event_interruptible_timeout(wq, condition, ret) \
-do { \
- wait_queue_t __wait; \
- init_waitqueue_entry(&__wait, current); \
- \
- add_wait_queue(&wq, &__wait); \
- for (;;) { \
- set_current_state(TASK_INTERRUPTIBLE); \
- if (condition) \
- break; \
- if (!signal_pending(current)) { \
- ret = schedule_timeout(ret); \
- if (!ret) \
- break; \
- continue; \
- } \
- ret = -ERESTARTSYS; \
- break; \
- } \
- current->state = TASK_RUNNING; \
- remove_wait_queue(&wq, &__wait); \
-} while (0)
-
-#define wait_event_interruptible_timeout(wq, condition, timeout) \
-({ \
- long __ret = timeout; \
- if (!(condition)) \
- __wait_event_interruptible_timeout(wq, condition, __ret); \
- __ret; \
-})
-#endif
-
-#ifndef VIDEO_AUDIO_BALANCE
-#define VIDEO_AUDIO_BALANCE 32
-#endif
-
-#ifndef list_for_each_entry
-#define list_for_each_entry(pos, head, member) \
- for (pos = list_entry((head)->next, typeof(*pos), member), \
- prefetch(pos->member.next); \
- &pos->member != (head); \
- pos = list_entry(pos->member.next, typeof(*pos), member), \
- prefetch(pos->member.next))
-#endif
-
-#ifndef iminor
-#define iminor(xx) minor(xx->i_rdev)
-#endif
-
-#ifndef irqreturn_t
-#define irqreturn_t void
-#define IRQ_NONE
-#define IRQ_HANDLED
-#endif
-
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,22))
-u32 crc32_le(u32 crc, unsigned char const *p, size_t len);
-#endif
-
-#define strlcpy strncpy
-
-extern devfs_handle_t dvb_devfs_handle;
-
-int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...);
-
-/* necessary dummy functions due to the > 2.5.67 kernel i2c changes */
-#define i2c_get_adapdata(adapter) (struct saa7146_dev*)adapter->data;
-
-/**
- * compatibility crap for old kernels. No guarantee for a working driver
- * even when everything compiles.
- */
-
-/* FIXME: check what is really necessary in here */
-#include <linux/module.h>
-#include <linux/list.h>
-
-
-#ifndef MODULE_LICENSE
-#define MODULE_LICENSE(x)
-#endif
-
-
-#ifndef list_for_each_safe
-#define list_for_each_safe(pos, n, head) \
- for (pos = (head)->next, n = pos->next; pos != (head); \
- pos = n, n = pos->next)
-#endif
-
-
-#ifndef __devexit_p
-#if defined(MODULE)
-#define __devexit_p(x) x
-#else
-#define __devexit_p(x) NULL
-#endif
-#endif
-
-
-
-#ifndef minor
-#define minor(dev) MINOR(dev)
-#endif
-
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20))
-static inline
-void cond_resched (void)
-{
- if (current->need_resched)
- schedule();
-}
-#endif
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-extern u32 crc32_be (u32 crc, unsigned char const *p, size_t len);
-#else
-#include <linux/crc32.h>
-#endif
-
-
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,48))
-static inline
-int try_module_get(struct module *mod)
-{
- if (!MOD_CAN_QUERY(mod))
- return 0;
- __MOD_INC_USE_COUNT(mod);
- return 1;
-}
-
-#define module_put(mod) __MOD_DEC_USE_COUNT(mod)
-#endif
-
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,20)
-extern struct page * vmalloc_to_page(void *addr);
-#define unlikely(x) __builtin_expect((x),0)
-#define BUG_ON(condition) do { if (unlikely((condition)!=0)) BUG(); } while(0)
-#endif
-
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include <linux/tqueue.h>
-#ifndef work_struct
-#define work_struct tq_struct
-#endif
-#ifndef INIT_WORK
-#define INIT_WORK(wq,routine,data) INIT_TQUEUE(wq,routine,data)
-#endif
-#ifndef schedule_work
-#define schedule_work(wq) schedule_task(wq)
-#endif
-#ifndef flush_scheduled_work
-#define flush_scheduled_work() flush_scheduled_tasks()
-#endif
-#else
-#include <linux/workqueue.h>
-#endif
-
-#endif
-
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index ab9111205..6ea66adad 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -686,23 +686,8 @@ static int dvb_frontend_start (struct dvb_frontend_data *fe)
fe->thread_pid = 0;
mb();
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-{
- /* bug in linux 2.4.x: kernel_thread() fails when the process calling
- * open() is run in the debugger (fixed in kernel 2.5). I hope this
- * workaround does not have any ugly side effects...
- */
- int pt = current->ptrace;
- current->ptrace = 0;
-#endif
-
ret = kernel_thread (dvb_frontend_thread, fe, 0);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- current->ptrace = pt;
-}
-#endif
-
if (ret < 0) {
printk("dvb_frontend_start: failed to start kernel_thread (%d)\n", ret);
up(&fe->sem);
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_functions.c b/linux/drivers/media/dvb/dvb-core/dvb_functions.c
index 100dcf51c..fb53bf492 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_functions.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_functions.c
@@ -7,27 +7,13 @@
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
-/* needed for 2.4/makelinks 2.6 stuff, don't submit
- to mainline kernel */
-#include <linux/version.h>
-
void dvb_kernel_thread_setup (const char *thread_name)
{
lock_kernel ();
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,61))
- daemonize ();
- strncpy (current->comm, thread_name, sizeof(current->comm));
-#else
daemonize (thread_name);
-#endif
-
-/* not needed anymore in 2.5.x, done in daemonize() */
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- reparent_to_init();
-#endif
-
sigfillset (&current->blocked);
+
unlock_kernel ();
}
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_functions.h b/linux/drivers/media/dvb/dvb-core/dvb_functions.h
index 54e7f5207..0abb91c61 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_functions.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_functions.h
@@ -24,11 +24,6 @@
#ifndef __DVB_FUNCTIONS_H__
#define __DVB_FUNCTIONS_H__
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include "dvb_compat.h"
-#endif
-
#include <linux/fs.h>
/**
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index f4fb2bd08..cbaf4155c 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -975,15 +975,8 @@ static struct net_device_stats * dvb_net_get_stats(struct net_device *dev)
return &((struct dvb_net_priv*) dev->priv)->stats;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static int dvb_net_init_dev (struct net_device *dev)
-#else
static void dvb_net_setup(struct net_device *dev)
-#endif
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- struct dvb_net_priv *priv = (struct dvb_net_priv*)dev->priv;
-#endif
ether_setup(dev);
dev->open = dvb_net_open;
@@ -996,13 +989,7 @@ static void dvb_net_setup(struct net_device *dev)
dev->mtu = 4096;
dev->mc_count = 0;
dev->hard_header_cache = NULL;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- dev->owner = priv->host->dvbdev->adapter->module;
-#endif
dev->flags |= IFF_NOARP;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- return 0;
-#endif
}
static int get_if(struct dvb_net *dvbnet)
@@ -1020,59 +1007,6 @@ static int get_if(struct dvb_net *dvbnet)
return i;
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
-{
- struct net_device *net;
- struct dmx_demux *demux;
- struct dvb_net_priv *priv;
- int result;
- int if_num;
-
- if (feedtype != DVB_NET_FEEDTYPE_MPE && feedtype != DVB_NET_FEEDTYPE_ULE)
- return -EINVAL;
- if ((if_num = get_if(dvbnet)) < 0)
- return -EINVAL;
-
- net = &dvbnet->device[if_num];
- demux = dvbnet->demux;
-
- memset(net, 0, sizeof(struct net_device));
-
- memcpy(net->name, "dvb0_0", 7);
- net->name[3] = dvbnet->dvbdev->adapter->num + '0';
- net->name[5] = if_num + '0';
- net->addr_len = 6;
- memcpy(net->dev_addr, dvbnet->dvbdev->adapter->proposed_mac, 6);
- net->next = NULL;
- net->init = dvb_net_init_dev;
-
- if (!(net->priv = kmalloc(sizeof(struct dvb_net_priv), GFP_KERNEL)))
- return -ENOMEM;
-
- priv = net->priv;
- memset(priv, 0, sizeof(struct dvb_net_priv));
- priv->demux = demux;
- priv->pid = pid;
- priv->rx_mode = RX_MODE_UNI;
- priv->host = dvbnet;
- priv->need_pusi = 1;
- priv->tscc = 0;
- priv->feedtype = feedtype;
- reset_ule(priv);
-
- INIT_WORK(&priv->set_multicast_list_wq, wq_set_multicast_list, net);
- INIT_WORK(&priv->restart_net_feed_wq, wq_restart_net_feed, net);
-
- net->base_addr = pid;
-
- if ((result = register_netdev(net)) < 0) {
- return result;
- }
-
- return if_num;
-}
-#else
static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
{
struct net_device *net;
@@ -1119,26 +1053,7 @@ static int dvb_net_add_if(struct dvb_net *dvbnet, u16 pid, u8 feedtype)
return if_num;
}
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static int dvb_net_remove_if(struct dvb_net *dvbnet, int num)
-{
- struct dvb_net_priv *priv = dvbnet->device[num].priv;
-
- if (!dvbnet->state[num])
- return -EINVAL;
- if (priv->in_use)
- return -EBUSY;
- dvb_net_stop(&dvbnet->device[num]);
- flush_scheduled_work();
- kfree(priv);
- unregister_netdev(&dvbnet->device[num]);
- dvbnet->state[num]=0;
- return 0;
-}
-#else
static int dvb_net_remove_if(struct dvb_net *dvbnet, int num)
{
struct net_device *net = dvbnet->device[num];
@@ -1158,7 +1073,6 @@ static int dvb_net_remove_if(struct dvb_net *dvbnet, int num)
return 0;
}
-#endif
static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
unsigned int cmd, void *parg)
@@ -1199,11 +1113,8 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
!dvbnet->state[dvbnetif->if_num])
return -EINVAL;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- netdev = &dvbnet->device[dvbnetif->if_num];
-#else
netdev = dvbnet->device[dvbnetif->if_num];
-#endif
+
priv_data=(struct dvb_net_priv*)netdev->priv;
dvbnetif->pid=priv_data->pid;
dvbnetif->feedtype=priv_data->feedtype;
@@ -1245,11 +1156,8 @@ static int dvb_net_do_ioctl(struct inode *inode, struct file *file,
!dvbnet->state[dvbnetif->if_num])
return -EINVAL;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- netdev = &dvbnet->device[dvbnetif->if_num];
-#else
netdev = dvbnet->device[dvbnetif->if_num];
-#endif
+
priv_data=(struct dvb_net_priv*)netdev->priv;
dvbnetif->pid=priv_data->pid;
break;
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.h b/linux/drivers/media/dvb/dvb-core/dvb_net.h
index 128796520..5b701efe8 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.h
@@ -34,11 +34,7 @@
struct dvb_net {
struct dvb_device *dvbdev;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- struct net_device device[DVB_NET_DEVICES_MAX];
-#else
struct net_device *device[DVB_NET_DEVICES_MAX];
-#endif
int state[DVB_NET_DEVICES_MAX];
struct dmx_demux *demux;
};
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_usb_compat.h b/linux/drivers/media/dvb/dvb-core/dvb_usb_compat.h
deleted file mode 100644
index 4968d09de..000000000
--- a/linux/drivers/media/dvb/dvb-core/dvb_usb_compat.h
+++ /dev/null
@@ -1,17 +0,0 @@
-#ifndef __MORECRAP_H
-#define __MORECRAP_H
-
-/* USB compatibility */
-
-#include <linux/usb.h>
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-typedef struct iso_packet_descriptor usb_iso_packet_descriptor;
-#define URB_ISO_ASAP USB_ISO_ASAP
-#define URB_MEM_FLAG
-#else
-#define URB_MEM_FLAG , GFP_ATOMIC
-#endif
-
-#endif
-
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 9f6a63714..239284435 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -46,15 +46,8 @@ static char *dnames[] = {
};
-#ifdef CONFIG_DVB_DEVFS_ONLY
-
- #define DVB_MAX_IDS ~0
- #define nums2minor(num,type,id) 0
-
-#else
-
- #define DVB_MAX_IDS 4
- #define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
+#define DVB_MAX_IDS 4
+#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
static struct dvb_device* dvbdev_find_device (int minor)
{
@@ -107,9 +100,6 @@ static struct file_operations dvb_device_fops =
.owner = THIS_MODULE,
.open = dvb_device_open,
};
-#endif /* CONFIG_DVB_DEVFS_ONLY */
-
-
int dvb_generic_open(struct inode *inode, struct file *file)
{
@@ -224,21 +214,6 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
list_add_tail (&dvbdev->list_head, &adap->device_list);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- {
- char name[64];
- snprintf(name, sizeof(name), "%s%d", dnames[type], id);
- dvbdev->devfs_handle = devfs_register(adap->devfs_handle, name,
- DEVFS_FL_DEFAULT,
- DVB_MAJOR,
- nums2minor(adap->num, type, id),
- S_IFCHR | S_IRUSR | S_IWUSR,
- dvbdev->fops, dvbdev);
- dprintk("DVB: register adapter%d/%s @ minor: %i (0x%02x)\n",
- adap->num, name, nums2minor(adap->num, type, id),
- nums2minor(adap->num, type, id));
- }
-#else
devfs_mk_cdev(MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)),
S_IFCHR | S_IRUSR | S_IWUSR,
"dvb/adapter%d/%s%d", adap->num, dnames[type], id);
@@ -246,10 +221,7 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev,
dprintk("DVB: register adapter%d/%s%d @ minor: %i (0x%02x)\n",
adap->num, dnames[type], id, nums2minor(adap->num, type, id),
nums2minor(adap->num, type, id));
-#endif
-
-
return 0;
}
@@ -259,12 +231,9 @@ void dvb_unregister_device(struct dvb_device *dvbdev)
if (!dvbdev)
return;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- devfs_unregister(dvbdev->devfs_handle);
-#else
devfs_remove("dvb/adapter%d/%s%d", dvbdev->adapter->num,
dnames[dvbdev->type], dvbdev->id);
-#endif
+
list_del (&dvbdev->list_head);
kfree (dvbdev);
}
@@ -314,15 +283,7 @@ int dvb_register_adapter(struct dvb_adapter **padap, const char *name, struct mo
printk ("DVB: registering new adapter (%s).\n", name);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- {
- char dirname[64];
- snprintf(dirname, sizeof(dirname), "adapter%d", num);
- adap->devfs_handle = devfs_mk_dir(dvb_devfs_handle, dirname, NULL);
- }
-#else
devfs_mk_dir("dvb/adapter%d", num);
-#endif
adap->num = num;
adap->name = name;
adap->module = module;
@@ -337,11 +298,8 @@ int dvb_register_adapter(struct dvb_adapter **padap, const char *name, struct mo
int dvb_unregister_adapter(struct dvb_adapter *adap)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- devfs_unregister(adap->devfs_handle);
-#else
devfs_remove("dvb/adapter%d", adap->num);
-#endif
+
if (down_interruptible (&dvbdev_register_lock))
return -ERESTARTSYS;
list_del (&adap->list_head);
@@ -354,29 +312,19 @@ int dvb_unregister_adapter(struct dvb_adapter *adap)
static int __init init_dvbdev(void)
{
int retval;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- dvb_devfs_handle = devfs_mk_dir (NULL, "dvb", NULL);
-#else
devfs_mk_dir("dvb");
-#endif
-#ifndef CONFIG_DVB_DEVFS_ONLY
+
if ((retval = register_chrdev(DVB_MAJOR,"DVB", &dvb_device_fops)))
printk("video_dev: unable to get major %d\n", DVB_MAJOR);
-#endif
+
return retval;
}
static void __exit exit_dvbdev(void)
{
-#ifndef CONFIG_DVB_DEVFS_ONLY
unregister_chrdev(DVB_MAJOR, "DVB");
-#endif
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- devfs_unregister(dvb_devfs_handle);
-#else
devfs_remove("dvb");
-#endif
}
module_init(init_dvbdev);
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.h b/linux/drivers/media/dvb/dvb-core/dvbdev.h
index cd0550b8f..3b0f396d5 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.h
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.h
@@ -44,10 +44,6 @@
struct dvb_adapter {
int num;
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- devfs_handle_t devfs_handle;
-#endif
struct list_head list_head;
struct list_head device_list;
const char *name;
@@ -60,9 +56,6 @@ struct dvb_adapter {
struct dvb_device {
struct list_head list_head;
struct file_operations *fops;
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- devfs_handle_t devfs_handle;
-#endif
struct dvb_adapter *adapter;
int type;
u32 id;
diff --git a/linux/drivers/media/dvb/frontends/stv0299.c b/linux/drivers/media/dvb/frontends/stv0299.c
index caa5d81d7..4ec231c02 100644
--- a/linux/drivers/media/dvb/frontends/stv0299.c
+++ b/linux/drivers/media/dvb/frontends/stv0299.c
@@ -1376,11 +1376,7 @@ static int attach_adapter(struct i2c_adapter *adapter)
memcpy(client, &client_template, sizeof(struct i2c_client));
client->adapter = adapter;
client->addr = (0x68>>1);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- client->data = state;
-#else
i2c_set_clientdata(client, (void*)state);
-#endif
if (0 != i2c_attach_client(client)) {
kfree(client);
@@ -1399,11 +1395,7 @@ static int detach_client(struct i2c_client *client)
static int command (struct i2c_client *client, unsigned int cmd, void *arg)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- struct stv0299_data *data = (struct stv0299_data*)client->data;
-#else
struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client);
-#endif
dprintk ("%s\n", __FUNCTION__);
@@ -1424,9 +1416,7 @@ static int command (struct i2c_client *client, unsigned int cmd, void *arg)
}
static struct i2c_driver driver = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
.owner = THIS_MODULE,
-#endif
.name = "stv0299",
.id = I2C_DRIVERID_STV0299,
.flags = I2C_DF_NOTIFY,
@@ -1436,11 +1426,7 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
I2C_DEVNAME("stv0299"),
-#else
- .name = "stv0299",
-#endif
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
diff --git a/linux/drivers/media/dvb/frontends/ves1x93.c b/linux/drivers/media/dvb/frontends/ves1x93.c
index 93925939d..75523847b 100644
--- a/linux/drivers/media/dvb/frontends/ves1x93.c
+++ b/linux/drivers/media/dvb/frontends/ves1x93.c
@@ -625,11 +625,7 @@ static int attach_adapter(struct i2c_adapter *adapter)
memcpy(client, &client_template, sizeof(struct i2c_client));
client->adapter = adapter;
client->addr = (0x08>>1);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- client->data = state;
-#else
i2c_set_clientdata(client, (void*)state);
-#endif
if (0 != i2c_attach_client(client)) {
kfree(client);
@@ -648,11 +644,7 @@ static int detach_client(struct i2c_client *client)
static int command (struct i2c_client *client, unsigned int cmd, void *arg)
{
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
- struct stv0299_data *data = (struct stv0299_data*)client->data;
-#else
struct stv0299_data *data = (struct stv0299_data*)i2c_get_clientdata(client);
-#endif
dprintk ("%s\n", __FUNCTION__);
@@ -673,9 +665,7 @@ static int command (struct i2c_client *client, unsigned int cmd, void *arg)
}
static struct i2c_driver driver = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
.owner = THIS_MODULE,
-#endif
.name = "ves1x93",
.id = I2C_DRIVERID_VES1X93,
.flags = I2C_DF_NOTIFY,
@@ -685,11 +675,7 @@ static struct i2c_driver driver = {
};
static struct i2c_client client_template = {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
I2C_DEVNAME("stv0299"),
-#else
- .name = "ves1x93",
-#endif
.flags = I2C_CLIENT_ALLOW_USE,
.driver = &driver,
};
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index ece90c88c..32510e4f4 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -48,10 +48,7 @@
#include <linux/string.h>
#include <linux/pci.h>
#include <linux/vmalloc.h>
-#include <linux/version.h>
-#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0))
#include <linux/firmware.h>
-#endif
#include <linux/crc32.h>
#include <linux/i2c.h>
@@ -1243,10 +1240,6 @@ static int master_xfer(struct dvb_i2c_bus *i2c, const struct i2c_msg msgs[], int
****************************************************************************/
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
-#define CONFIG_DVB_AV7110_FIRMWARE_FILE
-#endif
-
static int check_firmware(struct av7110* av7110)
{
u32 crc = 0, len = 0;
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ir.c b/linux/drivers/media/dvb/ttpci/av7110_ir.c
index d88e1a5d6..e5a95e1c3 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_ir.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c
@@ -7,11 +7,6 @@
#include "av7110.h"
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include "input_fake.h"
-#endif
-
-
#define UP_TIMEOUT (HZ/4)
static int av7110_ir_debug = 0;
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index 1849067e8..56ed4b079 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -41,10 +41,6 @@
#include "dvb_functions.h"
#include "dvb_ca_en50221.h"
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
-#include "input_fake.h"
-#endif
-
#define DEBIADDR_IR 0x1234
#define DEBIADDR_CICONTROL 0x0000
#define DEBIADDR_CIVERSION 0x4000
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 7599e0b2e..ff22dd7d0 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -9,7 +9,6 @@
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*/
-#include <linux/version.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/wait.h>
@@ -29,7 +28,6 @@
#include <linux/dvb/dmx.h>
#include <linux/pci.h>
-#include "dvb_usb_compat.h"
#include "dvb_functions.h"
/*
@@ -748,11 +746,7 @@ static void ttusb_process_frame(struct ttusb *ttusb, u8 * data, int len)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_iso_irq(struct urb *urb)
-#else
static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
-#endif
{
struct ttusb *ttusb = urb->context;
@@ -793,9 +787,7 @@ static void ttusb_iso_irq(struct urb *urb, struct pt_regs *ptregs)
ttusb_process_frame(ttusb, data, len);
}
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- usb_submit_urb(urb URB_MEM_FLAG);
-#endif
+ usb_submit_urb(urb, GFP_ATOMIC);
}
static void ttusb_free_iso_urbs(struct ttusb *ttusb)
@@ -830,7 +822,7 @@ static int ttusb_alloc_iso_urbs(struct ttusb *ttusb)
if (!
(urb =
- usb_alloc_urb(FRAMES_PER_ISO_BUF URB_MEM_FLAG))) {
+ usb_alloc_urb(FRAMES_PER_ISO_BUF, GFP_ATOMIC))) {
ttusb_free_iso_urbs(ttusb);
return -ENOMEM;
}
@@ -873,9 +865,7 @@ static int ttusb_start_iso_xfer(struct ttusb *ttusb)
urb->complete = ttusb_iso_irq;
urb->pipe = ttusb->isoc_in_pipe;
urb->transfer_flags = URB_ISO_ASAP;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
urb->interval = 1;
-#endif
urb->number_of_packets = FRAMES_PER_ISO_BUF;
urb->transfer_buffer_length =
ISO_FRAME_SIZE * FRAMES_PER_ISO_BUF;
@@ -889,15 +879,8 @@ static int ttusb_start_iso_xfer(struct ttusb *ttusb)
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- for (i = 0; i < ISO_BUF_COUNT; i++) {
- int next = (i + 1) % ISO_BUF_COUNT;
- ttusb->iso_urb[i]->next = ttusb->iso_urb[next];
- }
-#endif
-
for (i = 0; i < ISO_BUF_COUNT; i++) {
- if ((err = usb_submit_urb(ttusb->iso_urb[i] URB_MEM_FLAG))) {
+ if ((err = usb_submit_urb(ttusb->iso_urb[i], GFP_ATOMIC))) {
ttusb_stop_iso_xfer(ttusb);
printk
("%s: failed urb submission (%i: err = %i)!\n",
@@ -1027,9 +1010,6 @@ static int ttusb_stop_feed(struct dvb_demux_feed *dvbdmxfeed)
static int ttusb_setup_interfaces(struct ttusb *ttusb)
{
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- usb_set_configuration(ttusb->dev, 1);
-#endif
usb_set_interface(ttusb->dev, 1, 1);
ttusb->bulk_out_pipe = usb_sndbulkpipe(ttusb->dev, 1);
@@ -1088,22 +1068,6 @@ static struct file_operations stc_fops = {
};
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void *ttusb_probe(struct usb_device *udev, unsigned int ifnum,
- const struct usb_device_id *id)
-{
- struct ttusb *ttusb;
- int result, channel;
-
- if (ifnum != 0)
- return NULL;
-
- dprintk("%s: TTUSB DVB connected\n", __FUNCTION__);
-
- if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
- return NULL;
-
-#else
static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
struct usb_device *udev;
@@ -1119,8 +1083,6 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
if (!(ttusb = kmalloc(sizeof(struct ttusb), GFP_KERNEL)))
return -ENOMEM;
-#endif
-
memset(ttusb, 0, sizeof(struct ttusb));
for (channel = 0; channel < TTUSB_MAXCHANNEL; ++channel) {
@@ -1193,38 +1155,21 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP
| S_IROTH | S_IWOTH, &stc_fops, ttusb);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
- return (void *) ttusb;
-#else
usb_set_intfdata(intf, (void *) ttusb);
return 0;
-#endif
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-static void ttusb_disconnect(struct usb_device *udev, void *data)
-{
- struct ttusb *ttusb = data;
-#else
static void ttusb_disconnect(struct usb_interface *intf)
{
struct ttusb *ttusb = usb_get_intfdata(intf);
usb_set_intfdata(intf, NULL);
-#endif
ttusb->disconnecting = 1;
ttusb_stop_iso_xfer(ttusb);
-#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,69))
-#undef devfs_remove
-#define devfs_remove(x) devfs_unregister(ttusb->stc_devfs_handle);
-#endif
-#if 0
- devfs_remove(TTUSB_BUDGET_NAME);
-#endif
ttusb->dvb_demux.dmx.close(&ttusb->dvb_demux.dmx);
dvb_net_release(&ttusb->dvbnet);
dvb_dmxdev_release(&ttusb->dmxdev);