diff options
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/common/saa7146_core.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_fops.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_hlp.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_i2c.c | 15 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_vbi.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/common/saa7146_video.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/Kconfig | 10 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/compat.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/av7110.c | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-av.c | 7 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-ci.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-core.c | 5 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget-patch.c | 3 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttpci/budget.c | 14 | ||||
-rw-r--r-- | linux/drivers/media/video/dpc7146.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/mxb.c | 6 |
16 files changed, 30 insertions, 66 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c index 385757bab..cad3931a4 100644 --- a/linux/drivers/media/common/saa7146_core.c +++ b/linux/drivers/media/common/saa7146_core.c @@ -20,10 +20,6 @@ #include <media/saa7146.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - /* global variables */ struct list_head saa7146_devices; struct semaphore saa7146_devices_lock; diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c index 31a277fb4..1bda284e4 100644 --- a/linux/drivers/media/common/saa7146_fops.c +++ b/linux/drivers/media/common/saa7146_fops.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - #define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1) /********************************************************************************/ diff --git a/linux/drivers/media/common/saa7146_hlp.c b/linux/drivers/media/common/saa7146_hlp.c index a5f374915..cc7180954 100644 --- a/linux/drivers/media/common/saa7146_hlp.c +++ b/linux/drivers/media/common/saa7146_hlp.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - #define my_min(type,x,y) \ ({ type __x = (x), __y = (y); __x < __y ? __x: __y; }) #define my_max(type,x,y) \ diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c index 33f750799..a1dedcae8 100644 --- a/linux/drivers/media/common/saa7146_i2c.c +++ b/linux/drivers/media/common/saa7146_i2c.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - /* helper function */ static void my_wait(struct saa7146_dev *dev, long ms) @@ -380,9 +376,11 @@ out: static int saa7146_i2c_xfer(struct i2c_adapter* adapter, struct i2c_msg msg[], int num) { - struct saa7146_dev* dev = (struct saa7146_dev*)adapter->data; - + struct saa7146_dev* dev = i2c_get_adapdata(adapter); + +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) DEB_I2C(("adapter: '%s'.\n", adapter->name)); +#endif /* use helper function to transfer data */ return saa7146_i2c_transfer(dev, msg, num, adapter->retries); @@ -412,8 +410,13 @@ int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c if( NULL != i2c_adapter ) { memset(i2c_adapter,0,sizeof(struct i2c_adapter)); strcpy(i2c_adapter->name, dev->name); +#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)) i2c_adapter->data = dev; i2c_adapter->algo = &saa7146_algo; +#else + strcpy(i2c_adapter->dev.name, dev->name); + i2c_set_adapdata(i2c_adapter,dev); +#endif i2c_adapter->algo_data = NULL; i2c_adapter->id = I2C_ALGO_SAA7146; i2c_adapter->timeout = SAA7146_I2C_TIMEOUT; diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c index 2b273e4d1..4e3eacb30 100644 --- a/linux/drivers/media/common/saa7146_vbi.c +++ b/linux/drivers/media/common/saa7146_vbi.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - static int vbi_pixel_to_capture = 720 * 2; static diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c index eb090eeeb..7cacfcbdd 100644 --- a/linux/drivers/media/common/saa7146_video.c +++ b/linux/drivers/media/common/saa7146_video.c @@ -1,9 +1,5 @@ #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME saa7146 -#endif - static int memory = 32; diff --git a/linux/drivers/media/dvb/dvb-core/Kconfig b/linux/drivers/media/dvb/dvb-core/Kconfig index c264b069c..99e2d6b9d 100644 --- a/linux/drivers/media/dvb/dvb-core/Kconfig +++ b/linux/drivers/media/dvb/dvb-core/Kconfig @@ -5,13 +5,3 @@ config DVB_CORE DVB core utility functions for device handling, software fallbacks etc. Say Y when you have a DVB card and want to use it. If unsure say N. - -config DVB_DEVFS_ONLY - bool "devfs only" - depends on DVB_CORE=y && DEVFS_FS - help - Drop support for old major/minor device scheme and support only devfs - systems. This saves some code. - - If unsure say N. - diff --git a/linux/drivers/media/dvb/dvb-core/compat.h b/linux/drivers/media/dvb/dvb-core/compat.h index 4ab3ef8c4..cbbaee353 100644 --- a/linux/drivers/media/dvb/dvb-core/compat.h +++ b/linux/drivers/media/dvb/dvb-core/compat.h @@ -7,6 +7,8 @@ #include <linux/version.h> #include <linux/fs.h> +/* necessary dummy functions due to the > 2.5.67 kernel i2c changes */ +#define i2c_get_adapdata(adapter) (struct saa7146_dev*)adapter->data; /** * a sleeping delay function, waits i ms diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c index 5b00e7cba..c0af67c34 100644 --- a/linux/drivers/media/dvb/ttpci/av7110.c +++ b/linux/drivers/media/dvb/ttpci/av7110.c @@ -4436,6 +4436,8 @@ struct pci_device_id pci_tbl[] = { } }; +MODULE_DEVICE_TABLE(pci, pci_tbl); + static int std_callback(struct saa7146_dev* dev, struct saa7146_standard *std) { av7110_t *av7110 = (av7110_t*)dev->ext_priv; diff --git a/linux/drivers/media/dvb/ttpci/budget-av.c b/linux/drivers/media/dvb/ttpci/budget-av.c index 95aa2fcc1..dd97a9203 100644 --- a/linux/drivers/media/dvb/ttpci/budget-av.c +++ b/linux/drivers/media/dvb/ttpci/budget-av.c @@ -34,11 +34,6 @@ #include "budget.h" #include <media/saa7146_vv.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME budget_av -#endif - - struct budget_av { struct budget budget; struct video_device vd; @@ -342,7 +337,7 @@ struct pci_device_id pci_tbl [] = { } }; - +MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c index a4f5bad49..13105dceb 100644 --- a/linux/drivers/media/dvb/ttpci/budget-ci.c +++ b/linux/drivers/media/dvb/ttpci/budget-ci.c @@ -28,10 +28,6 @@ */ #include "budget.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME budget -#endif - #include <linux/module.h> #include <linux/errno.h> @@ -388,7 +384,7 @@ struct pci_device_id pci_tbl[] = { } }; - +MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c index e1a606c65..041265b7a 100644 --- a/linux/drivers/media/dvb/ttpci/budget-core.c +++ b/linux/drivers/media/dvb/ttpci/budget-core.c @@ -253,9 +253,9 @@ int ttpci_budget_init (struct budget *budget, saa7146_setgpio(dev, 2, SAA7146_GPIO_OUTHI); /* frontend power on */ - if (budget_register(budget) == 0) + if (budget_register(budget) == 0) { return 0; - + } err: if (budget->grabbing) vfree(budget->grabbing); @@ -287,7 +287,6 @@ int ttpci_budget_deinit (struct budget *budget) saa7146_pgtable_free (dev->pci, &budget->pt); vfree (budget->grabbing); - kfree (budget); return 0; } diff --git a/linux/drivers/media/dvb/ttpci/budget-patch.c b/linux/drivers/media/dvb/ttpci/budget-patch.c index d2f1d44f5..1ef2e1022 100644 --- a/linux/drivers/media/dvb/ttpci/budget-patch.c +++ b/linux/drivers/media/dvb/ttpci/budget-patch.c @@ -32,9 +32,6 @@ #include "budget.h" #include "av7110.h" -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME budget_patch -#endif #define budget_patch budget diff --git a/linux/drivers/media/dvb/ttpci/budget.c b/linux/drivers/media/dvb/ttpci/budget.c index 3188406f7..6709a1867 100644 --- a/linux/drivers/media/dvb/ttpci/budget.c +++ b/linux/drivers/media/dvb/ttpci/budget.c @@ -151,15 +151,18 @@ int budget_diseqc_ioctl (struct dvb_frontend *fe, unsigned int cmd, void *arg) static int budget_attach (struct saa7146_dev* dev, struct saa7146_pci_extension_data *info) { - struct budget *budget; + struct budget *budget = NULL; int err; - if (!(budget = kmalloc (sizeof(struct budget), GFP_KERNEL))) + budget = kmalloc(sizeof(struct budget), GFP_KERNEL); + if( NULL == budget ) { return -ENOMEM; + } - DEB_EE(("budget: %p\n",budget)); + DEB_EE(("dev:%p, info:%p, budget:%p\n",dev,info,budget)); if ((err = ttpci_budget_init (budget, dev, info))) { + printk("==> failed\n"); kfree (budget); return err; } @@ -185,7 +188,8 @@ int budget_detach (struct saa7146_dev* dev) err = ttpci_budget_deinit (budget); kfree (budget); - + dev->ext_priv = NULL; + return err; } @@ -213,7 +217,7 @@ struct pci_device_id pci_tbl[] = { } }; - +MODULE_DEVICE_TABLE(pci, pci_tbl); static struct saa7146_extension budget_extension = { diff --git a/linux/drivers/media/video/dpc7146.c b/linux/drivers/media/video/dpc7146.c index ee2eb280f..403bbca5e 100644 --- a/linux/drivers/media/video/dpc7146.c +++ b/linux/drivers/media/video/dpc7146.c @@ -23,10 +23,6 @@ #include <media/saa7146_vv.h> #include <linux/video_decoder.h> /* for saa7111a */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME dpc7146 -#endif - #define I2C_SAA7111A 0x24 /* All unused bytes are reserverd. */ @@ -340,6 +336,8 @@ struct pci_device_id pci_tbl[] = { } }; +MODULE_DEVICE_TABLE(pci, pci_tbl); + static struct saa7146_ext_vv vv_data = { .inputs = DPC_INPUTS, diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c index b602a1d26..2463987b4 100644 --- a/linux/drivers/media/video/mxb.c +++ b/linux/drivers/media/video/mxb.c @@ -26,10 +26,6 @@ #include <media/saa7146_vv.h> #include <linux/video_decoder.h> /* for saa7111a */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,51) - #define KBUILD_MODNAME mxb -#endif - #include "mxb.h" #include "tea6415c.h" #include "tea6420.h" @@ -1030,6 +1026,8 @@ struct pci_device_id pci_tbl[] = { } }; +MODULE_DEVICE_TABLE(pci, pci_tbl); + static struct saa7146_ext_vv vv_data = { .inputs = MXB_INPUTS, |