summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-av.c7
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c6
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c5
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-patch.c3
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.c14
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 = {