diff options
author | Michael Hunold <devnull@localhost> | 2003-04-22 16:30:45 +0000 |
---|---|---|
committer | Michael Hunold <devnull@localhost> | 2003-04-22 16:30:45 +0000 |
commit | 5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7 (patch) | |
tree | 9dfb86fc68b477636df48c5b5ea3af5bfce6193e /linux/drivers/media/dvb/ttpci | |
parent | e4b81e505a1aee843073badd3062488776aecfa0 (diff) | |
download | mediapointer-dvb-s2-5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7.tar.gz mediapointer-dvb-s2-5e8fe57d32dd88f0f84ff9c19e57d2e586dba9a7.tar.bz2 |
- removed the compatibility crap around KBUILD_MODNAME from all drivers,
use KBUILD_BASENAME for 2.4 instead
some changes to the i2c core to make it work with both 2.4 and late 2.5
kernels (not done yet -- only interesting for analog drivers)
- add MODULE_DEVICE_TABLE to all drivers, so that pci "hotplug" can detect
the devices automatically. Alan Cox says, that we should use this to load
the firmware (not done yet)
- fix the long standing "insmod/rmmod with multiple budget cards" bug -- it
was a double kfree() call...
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-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 |
6 files changed, 15 insertions, 22 deletions
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 = { |