summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/common')
-rw-r--r--linux/drivers/media/common/Kconfig4
-rw-r--r--linux/drivers/media/common/saa7146.h10
-rw-r--r--linux/drivers/media/common/saa7146_core.c14
3 files changed, 17 insertions, 11 deletions
diff --git a/linux/drivers/media/common/Kconfig b/linux/drivers/media/common/Kconfig
index 17cb90bc3..87edcbb98 100644
--- a/linux/drivers/media/common/Kconfig
+++ b/linux/drivers/media/common/Kconfig
@@ -1,7 +1,7 @@
config VIDEO_SAA7146
tristate
- default y if DVB_AV7110=y || VIDEO_MXB=y
- default m if DVB_AV7110=m || VIDEO_MXB=m
+ default y if DVB_AV7110=y || DVB_BUDGET=y || DVB_BUDGET_AV=y || VIDEO_MXB=y
+ default m if DVB_AV7110=y || DVB_BUDGET=m || DVB_BUDGET_AV=m || VIDEO_MXB=m
depends on VIDEO_DEV && PCI
config VIDEO_VIDEOBUF
diff --git a/linux/drivers/media/common/saa7146.h b/linux/drivers/media/common/saa7146.h
index 972e7774f..907989cfe 100644
--- a/linux/drivers/media/common/saa7146.h
+++ b/linux/drivers/media/common/saa7146.h
@@ -55,7 +55,10 @@ struct saa7146_extension;
struct saa7146_vv;
struct saa7146_sub_info {
- unsigned int subvendor, subdevice;
+ unsigned int subvendor;
+ unsigned int subdevice;
+ char **name;
+ int type;
};
/* saa7146 page table */
@@ -88,8 +91,7 @@ struct saa7146_extension
/* extension functions */
int (*preinit)(struct saa7146_dev*);
int (*probe)(struct saa7146_dev*, unsigned int subvendor, unsigned int subdevice);
-
- int (*attach)(struct saa7146_dev*);
+ int (*attach)(struct saa7146_dev *, struct saa7146_sub_info *);
int (*detach)(struct saa7146_dev*);
u32 irq_mask; /* mask to indicate, which irq-events are handled by the extension */
@@ -112,6 +114,8 @@ struct saa7146_dev
/* pci-device & irq stuff*/
char name[32];
struct pci_dev *pci;
+ u32 int_todo;
+ spinlock_t int_slock;
/* extension handling */
struct saa7146_extension *ext; /* indicates if handled by extension */
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index 1b4ca2222..432fa4f4e 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -233,15 +233,16 @@ void try_attach_extension_and_device(struct saa7146_dev *dev, struct saa7146_ext
DEB_S(("ext->preinit() failed for %p. skipping.\n",dev));
return;
}
-
- if( 0 != ext->probe(dev, dev->pci->subsystem_vendor, dev->pci->subsystem_device) ) {
- DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
- return;
+
+ if( 0 != ext->probe) {
+ if( 0 != ext->probe(dev, dev->pci->subsystem_vendor, dev->pci->subsystem_device) ) {
+ DEB_D(("ext->probe() failed for %p. skipping device.\n",dev));
+ return;
+ }
}
dev->ext = ext;
-
- if( 0 != ext->attach(dev) ) {
+ if( 0 != ext->attach(dev, &ext->devices[i]) ) {
DEB_D(("ext->attach() failed for %p. skipping device.\n",dev));
dev->ext = NULL;
return;
@@ -447,6 +448,7 @@ static int config_a_device(struct pci_dev *pci)
pci_set_drvdata(pci,dev);
init_MUTEX(&dev->lock);
+ dev->int_slock = SPIN_LOCK_UNLOCKED;
dev->slock = SPIN_LOCK_UNLOCKED;
init_MUTEX(&dev->i2c_lock);