summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-common.h6
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-usb.c3
-rw-r--r--linux/drivers/media/dvb/bt8xx/bt878.h6
-rw-r--r--linux/drivers/media/dvb/bt8xx/dst_common.h6
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c33
-rw-r--r--linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h6
-rw-r--r--linux/drivers/media/dvb/cinergyT2/cinergyT2.c30
-rw-r--r--linux/drivers/media/dvb/dvb-core/dmxdev.h10
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_demux.h6
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.h6
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_net.c6
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c6
-rw-r--r--linux/drivers/media/dvb/dvb-usb/Kconfig1
-rw-r--r--linux/drivers/media/dvb/dvb-usb/a800.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/af9005.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/anysee.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/au6610.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/cxusb.c149
-rw-r--r--linux/drivers/media/dvb/dvb-usb/cxusb.h3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dib0700_devices.c7
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-mb.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-mc.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/digitv.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dtt200u.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c4
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h6
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c4
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb.h10
-rw-r--r--linux/drivers/media/dvb/dvb-usb/gl861.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/gp8psk.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/m920x.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/umt-010.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/vp702x.c3
-rw-r--r--linux/drivers/media/dvb/dvb-usb/vp7045.c3
-rw-r--r--linux/drivers/media/dvb/frontends/bcm3510.c6
-rw-r--r--linux/drivers/media/dvb/frontends/drx397xD.c8
-rw-r--r--linux/drivers/media/dvb/frontends/lgdt330x.c24
-rw-r--r--linux/drivers/media/dvb/ttpci/Makefile1
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.c4
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110.h14
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_ir.c6
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-ci.c6
-rw-r--r--linux/drivers/media/dvb/ttpci/budget-core.c4
-rw-r--r--linux/drivers/media/dvb/ttpci/budget.h7
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c29
-rw-r--r--linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c10
47 files changed, 185 insertions, 287 deletions
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-common.h b/linux/drivers/media/dvb/b2c2/flexcop-common.h
index 22fc0490d..166f0fb09 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-common.h
+++ b/linux/drivers/media/dvb/b2c2/flexcop-common.h
@@ -10,9 +10,7 @@
#include <linux/pci.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "flexcop-reg.h"
@@ -84,11 +82,7 @@ struct flexcop_device {
int (*fe_sleep) (struct dvb_frontend *);
struct flexcop_i2c_adapter fc_i2c_adap[3];
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex i2c_mutex;
-#else
- struct semaphore i2c_mutex;
-#endif
struct module *owner;
/* options and status */
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-usb.c b/linux/drivers/media/dvb/b2c2/flexcop-usb.c
index d523dd5bf..4be298e90 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-usb.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-usb.c
@@ -550,9 +550,6 @@ MODULE_DEVICE_TABLE (usb, flexcop_usb_table);
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver flexcop_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "b2c2_flexcop_usb",
.probe = flexcop_usb_probe,
.disconnect = flexcop_usb_disconnect,
diff --git a/linux/drivers/media/dvb/bt8xx/bt878.h b/linux/drivers/media/dvb/bt8xx/bt878.h
index 9bef8bbdb..8319457f7 100644
--- a/linux/drivers/media/dvb/bt8xx/bt878.h
+++ b/linux/drivers/media/dvb/bt8xx/bt878.h
@@ -26,9 +26,7 @@
#include <linux/sched.h>
#include <linux/spinlock.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "bt848.h"
#include "bttv.h"
@@ -107,11 +105,7 @@
extern int bt878_num;
struct bt878 {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex gpio_lock;
-#else
- struct semaphore gpio_lock;
-#endif
unsigned int nr;
unsigned int bttv_nr;
struct i2c_adapter *adapter;
diff --git a/linux/drivers/media/dvb/bt8xx/dst_common.h b/linux/drivers/media/dvb/bt8xx/dst_common.h
index 47b62ef3c..40e6a88a9 100644
--- a/linux/drivers/media/dvb/bt8xx/dst_common.h
+++ b/linux/drivers/media/dvb/bt8xx/dst_common.h
@@ -25,9 +25,7 @@
#include <linux/dvb/frontend.h>
#include <linux/device.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "bt878.h"
#include "dst_ca.h"
@@ -140,11 +138,7 @@ struct dst_state {
u8 board_info[8];
u32 tuner_type;
char *tuner_name;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex dst_mutex;
-#else
- struct semaphore dst_mutex;
-#endif
u8 fw_name[8];
struct dvb_device *dst_ca;
};
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 27d092448..5fb213cf9 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -804,15 +804,8 @@ static int __devinit dvb_bt8xx_load_card(struct dvb_bt8xx_card *card, u32 type)
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-static int dvb_bt8xx_probe(struct device *dev)
-#else
static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)
-#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- struct bttv_sub_device *sub = to_bttv_sub_dev(dev);
-#endif
struct dvb_bt8xx_card *card;
struct pci_dev* bttv_pci_dev;
int ret;
@@ -921,25 +914,13 @@ static int __devinit dvb_bt8xx_probe(struct bttv_sub_device *sub)
return ret;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- dev_set_drvdata(dev, card);
-#else
dev_set_drvdata(&sub->dev, card);
-#endif
return 0;
}
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-static int dvb_bt8xx_remove(struct device *dev)
-#else
static void dvb_bt8xx_remove(struct bttv_sub_device *sub)
-#endif
{
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- struct dvb_bt8xx_card *card = dev_get_drvdata(dev);
-#else
struct dvb_bt8xx_card *card = dev_get_drvdata(&sub->dev);
-#endif
dprintk("dvb_bt8xx: unloading card%d\n", card->bttv_nr);
@@ -957,25 +938,12 @@ static void dvb_bt8xx_remove(struct bttv_sub_device *sub)
dvb_unregister_adapter(&card->dvb_adapter);
kfree(card);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- return (0);
-#endif
}
static struct bttv_sub_driver driver = {
.drv = {
.name = "dvb-bt8xx",
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .probe = dvb_bt8xx_probe,
- .remove = dvb_bt8xx_remove,
- /* FIXME:
- * .shutdown = dvb_bt8xx_shutdown,
- * .suspend = dvb_bt8xx_suspend,
- * .resume = dvb_bt8xx_resume,
- */
-#endif
},
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
.probe = dvb_bt8xx_probe,
.remove = dvb_bt8xx_remove,
/* FIXME:
@@ -983,7 +951,6 @@ static struct bttv_sub_driver driver = {
* .suspend = dvb_bt8xx_suspend,
* .resume = dvb_bt8xx_resume,
*/
-#endif
};
static int __init dvb_bt8xx_init(void)
diff --git a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
index 6b4ed25c7..a87b3a417 100644
--- a/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
+++ b/linux/drivers/media/dvb/bt8xx/dvb-bt8xx.h
@@ -27,9 +27,7 @@
#include <linux/i2c.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvbdev.h"
#include "dvb_net.h"
#include "bttv.h"
@@ -44,11 +42,7 @@
#include "tuner-simple.h"
struct dvb_bt8xx_card {
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
-#else
- struct semaphore lock;
-#endif
int nfeeds;
char card_name[32];
struct dvb_adapter dvb_adapter;
diff --git a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
index 651df056e..52f104d2b 100644
--- a/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
+++ b/linux/drivers/media/dvb/cinergyT2/cinergyT2.c
@@ -29,9 +29,7 @@
#include <linux/input.h>
#include <linux/dvb/frontend.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/mm.h>
#include <asm/io.h>
@@ -63,15 +61,6 @@ MODULE_PARM_DESC(debug, "Turn on/off debugging (default:off).");
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define dprintk(level, args...) \
-do { \
- if ((debug & level)) { \
- printk("%s: %s(): ", __stringify(KBUILD_MODNAME), \
- __FUNCTION__); \
- printk(args); } \
-} while (0)
-#else
#define dprintk(level, args...) \
do { \
if ((debug & level)) { \
@@ -79,7 +68,6 @@ do { \
__func__); \
printk(args); } \
} while (0)
-#endif
enum cinergyt2_ep1_cmd {
CINERGYT2_EP1_PID_TABLE_RESET = 0x01,
@@ -132,13 +120,8 @@ static struct dvb_frontend_info cinergyt2_fe_info = {
struct cinergyt2 {
struct dvb_demux demux;
struct usb_device *udev;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex sem;
struct mutex wq_sem;
-#else
- struct semaphore sem;
- struct semaphore wq_sem;
-#endif
struct dvb_adapter adapter;
struct dvb_device *fedev;
struct dmxdev dmxdev;
@@ -896,11 +879,7 @@ static int cinergyt2_register_rc(struct cinergyt2 *cinergyt2)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &cinergyt2->udev->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &cinergyt2->udev->dev;
-#else
- input_dev->dev = &cinergyt2->udev->dev;
-#endif
#endif
err = input_register_device(input_dev);
@@ -1086,12 +1065,6 @@ static int cinergyt2_suspend (struct usb_interface *intf, pm_message_t state)
if (mutex_lock_interruptible(&cinergyt2->wq_sem))
return -ERESTARTSYS;
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
- if (state <= 0) {
- mutex_unlock(&cinergyt2->wq_sem);
- return 0;
- }
-#endif
cinergyt2_suspend_rc(cinergyt2);
cancel_rearming_delayed_work(&cinergyt2->query_work);
@@ -1147,9 +1120,6 @@ static const struct usb_device_id cinergyt2_table [] __devinitdata = {
MODULE_DEVICE_TABLE(usb, cinergyt2_table);
static struct usb_driver cinergyt2_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "cinergyT2",
.probe = cinergyt2_probe,
.disconnect = cinergyt2_disconnect,
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.h b/linux/drivers/media/dvb/dvb-core/dmxdev.h
index bb416e6c2..7e8137d0b 100644
--- a/linux/drivers/media/dvb/dvb-core/dmxdev.h
+++ b/linux/drivers/media/dvb/dvb-core/dmxdev.h
@@ -31,9 +31,7 @@
#include <linux/fs.h>
#include <linux/string.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/dvb/dmx.h>
@@ -76,11 +74,7 @@ struct dmxdev_filter {
struct dmxdev *dev;
struct dvb_ringbuffer buffer;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
/* only for sections */
struct timer_list timer;
@@ -106,11 +100,7 @@ struct dmxdev {
struct dvb_ringbuffer dvr_buffer;
#define DVR_BUFFER_SIZE (10*188*1024)
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
spinlock_t lock;
};
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_demux.h b/linux/drivers/media/dvb/dvb-core/dvb_demux.h
index 099b149e5..933397c24 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_demux.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_demux.h
@@ -27,9 +27,7 @@
#include <linux/timer.h>
#include <linux/spinlock.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "demux.h"
@@ -128,11 +126,7 @@ struct dvb_demux {
u8 tsbuf[204];
int tsbufp;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
spinlock_t lock;
};
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
index fc3213fec..aa4133f0b 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -35,9 +35,7 @@
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/delay.h>
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <linux/dvb/frontend.h>
@@ -181,11 +179,7 @@ struct dvb_fe_events {
int eventr;
int overflow;
wait_queue_head_t wait_queue;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mtx;
-#else
- struct semaphore mtx;
-#endif
};
struct dvb_frontend {
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c
index 2d2da4dff..3c0106f65 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_net.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c
@@ -63,9 +63,7 @@
#include <asm/uaccess.h>
#include <linux/crc32.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvb_demux.h"
#include "dvb_net.h"
@@ -161,11 +159,7 @@ struct dvb_net_priv {
unsigned char ule_bridged; /* Whether the ULE_BRIDGED extension header was found. */
int ule_sndu_remain; /* Nr. of bytes still required for current ULE SNDU. */
unsigned long ts_count; /* Current ts cell counter. */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex mutex;
-#else
- struct semaphore mutex;
-#endif
};
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 3439ccec6..0ae0e5852 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -32,9 +32,7 @@
#include <linux/fs.h>
#include <linux/cdev.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvbdev.h"
static int dvbdev_debug;
@@ -56,11 +54,7 @@ static const char * const dnames[] = {
#define nums2minor(num,type,id) ((num << 6) | (id << 4) | type)
#define MAX_DVB_MINORS (DVB_MAX_ADAPTERS*64)
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
static struct class *dvb_class;
-#else
-static struct class_simple *dvb_class;
-#endif
static struct dvb_device* dvbdev_find_device (int minor)
{
diff --git a/linux/drivers/media/dvb/dvb-usb/Kconfig b/linux/drivers/media/dvb/dvb-usb/Kconfig
index 7847a8320..a577c0f89 100644
--- a/linux/drivers/media/dvb/dvb-usb/Kconfig
+++ b/linux/drivers/media/dvb/dvb-usb/Kconfig
@@ -109,6 +109,7 @@ config DVB_USB_CXUSB
select DVB_ZL10353 if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_SIMPLE if !DVB_FE_CUSTOMISE
select MEDIA_TUNER_XC2028 if !DVB_FE_CUSTOMISE
+ select MEDIA_TUNER_MXL5005S if !DVB_FE_CUSTOMISE
help
Say Y here to support the Conexant USB2.0 hybrid reference design.
Currently, only DVB and ATSC modes are supported, analog mode
diff --git a/linux/drivers/media/dvb/dvb-usb/a800.c b/linux/drivers/media/dvb/dvb-usb/a800.c
index de7194ee7..dc8c8784c 100644
--- a/linux/drivers/media/dvb/dvb-usb/a800.c
+++ b/linux/drivers/media/dvb/dvb-usb/a800.c
@@ -164,9 +164,6 @@ static struct dvb_usb_device_properties a800_properties = {
};
static struct usb_driver a800_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_a800",
.probe = a800_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/af9005.c b/linux/drivers/media/dvb/dvb-usb/af9005.c
index 04270dd3d..cfe71feef 100644
--- a/linux/drivers/media/dvb/dvb-usb/af9005.c
+++ b/linux/drivers/media/dvb/dvb-usb/af9005.c
@@ -1099,9 +1099,6 @@ static struct dvb_usb_device_properties af9005_properties = {
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver af9005_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_af9005",
.probe = af9005_usb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/anysee.c b/linux/drivers/media/dvb/dvb-usb/anysee.c
index 224919559..adfd4fc82 100644
--- a/linux/drivers/media/dvb/dvb-usb/anysee.c
+++ b/linux/drivers/media/dvb/dvb-usb/anysee.c
@@ -521,9 +521,6 @@ static struct dvb_usb_device_properties anysee_properties = {
};
static struct usb_driver anysee_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_anysee",
.probe = anysee_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/au6610.c b/linux/drivers/media/dvb/dvb-usb/au6610.c
index fc3375c60..eb34cc389 100644
--- a/linux/drivers/media/dvb/dvb-usb/au6610.c
+++ b/linux/drivers/media/dvb/dvb-usb/au6610.c
@@ -225,9 +225,6 @@ static struct dvb_usb_device_properties au6610_properties = {
};
static struct usb_driver au6610_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_au6610",
.probe = au6610_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c
index ddfa0cff7..9a3e97247 100644
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c
@@ -34,6 +34,7 @@
#include "zl10353.h"
#include "tuner-xc2028.h"
#include "tuner-simple.h"
+#include "mxl5005s.h"
/* debug */
static int dvb_usb_cxusb_debug;
@@ -42,9 +43,8 @@ MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_ST
DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);
-#define deb_info(args...) dprintk(dvb_usb_cxusb_debug,0x01,args)
-#define deb_i2c(args...) if (d->udev->descriptor.idVendor == USB_VID_MEDION) \
- dprintk(dvb_usb_cxusb_debug,0x01,args)
+#define deb_info(args...) dprintk(dvb_usb_cxusb_debug, 0x03, args)
+#define deb_i2c(args...) dprintk(dvb_usb_cxusb_debug, 0x02, args)
static int cxusb_ctrl_msg(struct dvb_usb_device *d,
u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen)
@@ -201,6 +201,46 @@ static int cxusb_power_ctrl(struct dvb_usb_device *d, int onoff)
return cxusb_ctrl_msg(d, CMD_POWER_OFF, &b, 1, NULL, 0);
}
+static int cxusb_aver_power_ctrl(struct dvb_usb_device *d, int onoff)
+{
+ int ret;
+ if (!onoff)
+ return cxusb_ctrl_msg(d, CMD_POWER_OFF, NULL, 0, NULL, 0);
+ if (d->state == DVB_USB_STATE_INIT &&
+ usb_set_interface(d->udev, 0, 0) < 0)
+ err("set interface failed");
+ do; while (!(ret = cxusb_ctrl_msg(d, CMD_POWER_ON, NULL, 0, NULL, 0)) &&
+ !(ret = cxusb_ctrl_msg(d, 0x15, NULL, 0, NULL, 0)) &&
+ !(ret = cxusb_ctrl_msg(d, 0x17, NULL, 0, NULL, 0)) && 0);
+ if (!ret) {
+ /* FIXME: We don't know why, but we need to configure the
+ * lgdt3303 with the register settings below on resume */
+ int i;
+ u8 buf, bufs[] = {
+ 0x0e, 0x2, 0x00, 0x7f,
+ 0x0e, 0x2, 0x02, 0xfe,
+ 0x0e, 0x2, 0x02, 0x01,
+ 0x0e, 0x2, 0x00, 0x03,
+ 0x0e, 0x2, 0x0d, 0x40,
+ 0x0e, 0x2, 0x0e, 0x87,
+ 0x0e, 0x2, 0x0f, 0x8e,
+ 0x0e, 0x2, 0x10, 0x01,
+ 0x0e, 0x2, 0x14, 0xd7,
+ 0x0e, 0x2, 0x47, 0x88,
+ };
+ msleep(20);
+ for (i = 0; i < sizeof(bufs)/sizeof(u8); i += 4/sizeof(u8)) {
+ ret = cxusb_ctrl_msg(d, CMD_I2C_WRITE,
+ bufs+i, 4, &buf, 1);
+ if (ret)
+ break;
+ if (buf != 0x8)
+ return -EREMOTEIO;
+ }
+ }
+ return ret;
+}
+
static int cxusb_bluebird_power_ctrl(struct dvb_usb_device *d, int onoff)
{
u8 b = 0;
@@ -232,6 +272,16 @@ static int cxusb_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
return 0;
}
+static int cxusb_aver_streaming_ctrl(struct dvb_usb_adapter *adap, int onoff)
+{
+ if (onoff)
+ cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_ON, NULL, 0, NULL, 0);
+ else
+ cxusb_ctrl_msg(adap->dev, CMD_AVER_STREAM_OFF,
+ NULL, 0, NULL, 0);
+ return 0;
+}
+
static int cxusb_rc_query(struct dvb_usb_device *d, u32 *event, int *state)
{
struct dvb_usb_rc_key *keymap = d->props.rc_key_map;
@@ -422,6 +472,12 @@ static struct lgdt330x_config cxusb_lgdt3303_config = {
.demod_chip = LGDT3303,
};
+static struct lgdt330x_config cxusb_aver_lgdt3303_config = {
+ .demod_address = 0x0e,
+ .demod_chip = LGDT3303,
+ .clock_polarity_flip = 2,
+};
+
static struct mt352_config cxusb_dee1601_config = {
.demod_address = 0x0f,
.demod_init = cxusb_dee1601_demod_init,
@@ -452,6 +508,24 @@ static struct mt352_config cxusb_mt352_xc3028_config = {
.demod_init = cxusb_mt352_demod_init,
};
+/* FIXME: needs tweaking */
+static struct mxl5005s_config aver_a868r_tuner = {
+ .i2c_address = 0x63,
+ .if_freq = 6000000UL,
+ .xtal_freq = CRYSTAL_FREQ_16000000HZ,
+ .agc_mode = MXL_SINGLE_AGC,
+ .tracking_filter = MXL_TF_C,
+ .rssi_enable = MXL_RSSI_ENABLE,
+ .cap_select = MXL_CAP_SEL_ENABLE,
+ .div_out = MXL_DIV_OUT_4,
+ .clock_out = MXL_CLOCK_OUT_DISABLE,
+ .output_load = MXL5005S_IF_OUTPUT_LOAD_200_OHM,
+ .top = MXL5005S_TOP_25P2,
+ .mod_mode = MXL_DIGITAL_MODE,
+ .if_mode = MXL_ZERO_IF,
+ .AgcMasterByte = 0x00,
+};
+
/* Callbacks for DVB USB */
static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap)
{
@@ -532,6 +606,13 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
return 0;
}
+static int cxusb_mxl5003s_tuner_attach(struct dvb_usb_adapter *adap)
+{
+ dvb_attach(mxl5005s_attach, adap->fe,
+ &adap->dev->i2c_adap, &aver_a868r_tuner);
+ return 0;
+}
+
static int cxusb_cx22702_frontend_attach(struct dvb_usb_adapter *adap)
{
u8 b;
@@ -561,6 +642,16 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap)
return -EIO;
}
+static int cxusb_aver_lgdt3303_frontend_attach(struct dvb_usb_adapter *adap)
+{
+ adap->fe = dvb_attach(lgdt330x_attach, &cxusb_aver_lgdt3303_config,
+ &adap->dev->i2c_adap);
+ if (adap->fe != NULL)
+ return 0;
+
+ return -EIO;
+}
+
static int cxusb_mt352_frontend_attach(struct dvb_usb_adapter *adap)
{
/* used in both lgz201 and th7579 */
@@ -721,6 +812,7 @@ static struct dvb_usb_device_properties cxusb_bluebird_dtt7579_properties;
static struct dvb_usb_device_properties cxusb_bluebird_dualdig4_properties;
static struct dvb_usb_device_properties cxusb_bluebird_nano2_properties;
static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_properties;
+static struct dvb_usb_device_properties cxusb_aver_a868r_properties;
static int cxusb_probe(struct usb_interface *intf,
const struct usb_device_id *id)
@@ -741,7 +833,10 @@ static int cxusb_probe(struct usb_interface *intf,
THIS_MODULE, NULL, adapter_nr) ||
0 == dvb_usb_device_init(intf,
&cxusb_bluebird_nano2_needsfirmware_properties,
- THIS_MODULE, NULL, adapter_nr))
+ THIS_MODULE, NULL, adapter_nr) ||
+ 0 == dvb_usb_device_init(intf, &cxusb_aver_a868r_properties,
+ THIS_MODULE, NULL, adapter_nr) ||
+ 0)
return 0;
return -EINVAL;
@@ -764,6 +859,7 @@ static struct usb_device_id cxusb_table [] = {
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DUAL_4) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2) },
{ USB_DEVICE(USB_VID_DVICO, USB_PID_DVICO_BLUEBIRD_DVB_T_NANO_2_NFW_WARM) },
+ { USB_DEVICE(USB_VID_AVERMEDIA, USB_PID_AVERMEDIA_VOLAR_A868R) },
{} /* Terminating entry */
};
MODULE_DEVICE_TABLE (usb, cxusb_table);
@@ -1167,10 +1263,49 @@ static struct dvb_usb_device_properties cxusb_bluebird_nano2_needsfirmware_prope
}
};
+static struct dvb_usb_device_properties cxusb_aver_a868r_properties = {
+ .caps = DVB_USB_IS_AN_I2C_ADAPTER,
+
+ .usb_ctrl = CYPRESS_FX2,
+
+ .size_of_priv = sizeof(struct cxusb_state),
+
+ .num_adapters = 1,
+ .adapter = {
+ {
+ .streaming_ctrl = cxusb_aver_streaming_ctrl,
+ .frontend_attach = cxusb_aver_lgdt3303_frontend_attach,
+ .tuner_attach = cxusb_mxl5003s_tuner_attach,
+ /* parameter for the MPEG2-data transfer */
+ .stream = {
+ .type = USB_BULK,
+ .count = 5,
+ .endpoint = 0x04,
+ .u = {
+ .bulk = {
+ .buffersize = 8192,
+ }
+ }
+ },
+
+ },
+ },
+ .power_ctrl = cxusb_aver_power_ctrl,
+
+ .i2c_algo = &cxusb_i2c_algo,
+
+ .generic_bulk_ctrl_endpoint = 0x01,
+
+ .num_device_descs = 1,
+ .devices = {
+ { "AVerMedia AVerTVHD Volar (A868R)",
+ { NULL },
+ { &cxusb_table[16], NULL },
+ },
+ }
+};
+
static struct usb_driver cxusb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_cxusb",
.probe = cxusb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.h b/linux/drivers/media/dvb/dvb-usb/cxusb.h
index 4768a2c35..1a51eafd3 100644
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.h
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.h
@@ -20,6 +20,9 @@
#define CMD_STREAMING_ON 0x36
#define CMD_STREAMING_OFF 0x37
+#define CMD_AVER_STREAM_ON 0x18
+#define CMD_AVER_STREAM_OFF 0x19
+
#define CMD_GET_IR_CODE 0x47
#define CMD_ANALOG 0x50
diff --git a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
index c4d40fe01..3dd20bfbe 100644
--- a/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/linux/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -1117,6 +1117,7 @@ struct usb_device_id dib0700_usb_id_table[] = {
{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_HT_EXPRESS) },
{ USB_DEVICE(USB_VID_TERRATEC, USB_PID_TERRATEC_CINERGY_T_XXS) },
{ USB_DEVICE(USB_VID_LEADTEK, USB_PID_WINFAST_DTV_DONGLE_STK7700P_2) },
+ { USB_DEVICE(USB_VID_HAUPPAUGE, USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009) },
{ 0 } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, dib0700_usb_id_table);
@@ -1372,7 +1373,7 @@ struct dvb_usb_device_properties dib0700_devices[] = {
}
},
- .num_device_descs = 2,
+ .num_device_descs = 3,
.devices = {
{ "DiBcom STK7070PD reference design",
{ &dib0700_usb_id_table[17], NULL },
@@ -1381,6 +1382,10 @@ struct dvb_usb_device_properties dib0700_devices[] = {
{ "Pinnacle PCTV Dual DVB-T Diversity Stick",
{ &dib0700_usb_id_table[18], NULL },
{ NULL },
+ },
+ { "Hauppauge Nova-TD Stick (52009)",
+ { &dib0700_usb_id_table[35], NULL },
+ { NULL },
}
}
}, { DIB0700_DEFAULT_DEVICE_PROPERTIES,
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
index 2ac86685d..eeef50bff 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -436,9 +436,6 @@ static struct dvb_usb_device_properties artec_t1_usb2_properties = {
};
static struct usb_driver dibusb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_dibusb_mb",
.probe = dibusb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c b/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
index b1658ac6b..059cec955 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-mc.c
@@ -124,9 +124,6 @@ static struct dvb_usb_device_properties dibusb_mc_properties = {
};
static struct usb_driver dibusb_mc_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_dibusb_mc",
.probe = dibusb_mc_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/digitv.c b/linux/drivers/media/dvb/dvb-usb/digitv.c
index 1394b3e6b..b545cf3ea 100644
--- a/linux/drivers/media/dvb/dvb-usb/digitv.c
+++ b/linux/drivers/media/dvb/dvb-usb/digitv.c
@@ -330,9 +330,6 @@ static struct dvb_usb_device_properties digitv_properties = {
};
static struct usb_driver digitv_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_digitv",
.probe = digitv_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/dtt200u.c b/linux/drivers/media/dvb/dvb-usb/dtt200u.c
index 5fcae7925..81a6cbf60 100644
--- a/linux/drivers/media/dvb/dvb-usb/dtt200u.c
+++ b/linux/drivers/media/dvb/dvb-usb/dtt200u.c
@@ -334,9 +334,6 @@ static struct dvb_usb_device_properties wt220u_miglia_properties = {
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver dtt200u_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_dtt200u",
.probe = dtt200u_usb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index 23428cd30..326f76089 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -20,11 +20,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
}
strncpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name));
-#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- d->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL,
-#else
d->i2c_adap.class = I2C_CLASS_TV_DIGITAL,
-#endif
d->i2c_adap.algo = d->props.i2c_algo;
d->i2c_adap.algo_data = NULL;
d->i2c_adap.dev.parent = &d->udev->dev;
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
index e6b43fb3a..e5238b31e 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -134,9 +134,15 @@
#define USB_PID_HAUPPAUGE_NOVA_T_STICK_3 0x7070
#define USB_PID_HAUPPAUGE_MYTV_T 0x7080
#define USB_PID_HAUPPAUGE_NOVA_TD_STICK 0x9580
+#define USB_PID_HAUPPAUGE_NOVA_TD_STICK_52009 0x5200
#define USB_PID_AVERMEDIA_EXPRESS 0xb568
#define USB_PID_AVERMEDIA_VOLAR 0xa807
#define USB_PID_AVERMEDIA_VOLAR_2 0xb808
+#define USB_PID_AVERMEDIA_VOLAR_A868R 0xa868
+#define USB_PID_AVERMEDIA_MCE_USB_M038 0x1228
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R 0x0039
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_ATSC 0x1039
+#define USB_PID_AVERMEDIA_HYBRID_ULTRA_USB_M039R_DVBT 0x2039
#define USB_PID_TECHNOTREND_CONNECT_S2400 0x3006
#define USB_PID_TERRATEC_CINERGY_DT_XS_DIVERSITY 0x005a
#define USB_PID_TERRATEC_CINERGY_HT_USB_XE 0x0058
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index b47427ea6..ec95bdf90 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -9,10 +9,8 @@
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/usb/input.h>
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
#include <linux/usb_input.h>
#endif
-#endif
/* Remote-control poll function - called every dib->rc_query_interval ms to see
* whether the remote control has received anything.
@@ -127,10 +125,8 @@ int dvb_usb_remote_init(struct dvb_usb_device *d)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &d->udev->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &d->udev->dev;
#endif
-#endif
/* set the bits for the keys */
deb_rc("key map size: %d\n", d->props.rc_key_map_size);
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
index f8528bf74..72503e2da 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb.h
@@ -14,9 +14,7 @@
#include <linux/usb.h>
#include <linux/firmware.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvb_frontend.h"
#include "dvb_demux.h"
@@ -354,18 +352,10 @@ struct dvb_usb_device {
int powered;
/* locking */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex usb_mutex;
-#else
- struct semaphore usb_mutex;
-#endif
/* i2c */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex i2c_mutex;
-#else
- struct semaphore i2c_mutex;
-#endif
struct i2c_adapter i2c_adap;
int num_adapters_initialized;
diff --git a/linux/drivers/media/dvb/dvb-usb/gl861.c b/linux/drivers/media/dvb/dvb-usb/gl861.c
index 36700b67d..6f596ed41 100644
--- a/linux/drivers/media/dvb/dvb-usb/gl861.c
+++ b/linux/drivers/media/dvb/dvb-usb/gl861.c
@@ -200,9 +200,6 @@ static struct dvb_usb_device_properties gl861_properties = {
};
static struct usb_driver gl861_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_gl861",
.probe = gl861_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/gp8psk.c b/linux/drivers/media/dvb/dvb-usb/gp8psk.c
index 0a152fcb5..6eb8cc37f 100644
--- a/linux/drivers/media/dvb/dvb-usb/gp8psk.c
+++ b/linux/drivers/media/dvb/dvb-usb/gp8psk.c
@@ -279,9 +279,6 @@ static struct dvb_usb_device_properties gp8psk_properties = {
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver gp8psk_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_gp8psk",
.probe = gp8psk_usb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/m920x.c b/linux/drivers/media/dvb/dvb-usb/m920x.c
index 5a7766fab..54626a0db 100644
--- a/linux/drivers/media/dvb/dvb-usb/m920x.c
+++ b/linux/drivers/media/dvb/dvb-usb/m920x.c
@@ -894,9 +894,6 @@ static struct dvb_usb_device_properties dposh_properties = {
};
static struct usb_driver m920x_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_m920x",
.probe = m920x_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
index a346040ca..07fb843c7 100644
--- a/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
+++ b/linux/drivers/media/dvb/dvb-usb/nova-t-usb2.c
@@ -214,9 +214,6 @@ static struct dvb_usb_device_properties nova_t_properties = {
};
static struct usb_driver nova_t_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_nova_t_usb2",
.probe = nova_t_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/umt-010.c b/linux/drivers/media/dvb/dvb-usb/umt-010.c
index b6a3cbc44..118aab1a3 100644
--- a/linux/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/linux/drivers/media/dvb/dvb-usb/umt-010.c
@@ -135,9 +135,6 @@ static struct dvb_usb_device_properties umt_properties = {
};
static struct usb_driver umt_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_umt_010",
.probe = umt_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/vp702x.c b/linux/drivers/media/dvb/dvb-usb/vp702x.c
index 9d286d430..c1db3271f 100644
--- a/linux/drivers/media/dvb/dvb-usb/vp702x.c
+++ b/linux/drivers/media/dvb/dvb-usb/vp702x.c
@@ -351,9 +351,6 @@ static struct dvb_usb_device_properties vp702x_properties = {
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver vp702x_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_vp702x",
.probe = vp702x_usb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/dvb-usb/vp7045.c b/linux/drivers/media/dvb/dvb-usb/vp7045.c
index b45498911..8fc2ba02a 100644
--- a/linux/drivers/media/dvb/dvb-usb/vp7045.c
+++ b/linux/drivers/media/dvb/dvb-usb/vp7045.c
@@ -288,9 +288,6 @@ static struct dvb_usb_device_properties vp7045_properties = {
/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver vp7045_usb_driver = {
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
- .owner = THIS_MODULE,
-#endif
.name = "dvb_usb_vp7045",
.probe = vp7045_usb_probe,
.disconnect = dvb_usb_device_exit,
diff --git a/linux/drivers/media/dvb/frontends/bcm3510.c b/linux/drivers/media/dvb/frontends/bcm3510.c
index ca9a55ae9..1cd63a4df 100644
--- a/linux/drivers/media/dvb/frontends/bcm3510.c
+++ b/linux/drivers/media/dvb/frontends/bcm3510.c
@@ -39,9 +39,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvb_frontend.h"
#include "bcm3510.h"
@@ -54,11 +52,7 @@ struct bcm3510_state {
struct dvb_frontend frontend;
/* demodulator private data */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex hab_mutex;
-#else
- struct semaphore hab_mutex;
-#endif
u8 firmware_loaded:1;
unsigned long next_status_check;
diff --git a/linux/drivers/media/dvb/frontends/drx397xD.c b/linux/drivers/media/dvb/frontends/drx397xD.c
index 327fff4b8..52a9a6553 100644
--- a/linux/drivers/media/dvb/frontends/drx397xD.c
+++ b/linux/drivers/media/dvb/frontends/drx397xD.c
@@ -74,7 +74,7 @@ static struct {
const struct firmware *file;
rwlock_t lock;
int refcnt;
- u8 *data[ARRAY_SIZE(blob_name)];
+ const u8 *data[ARRAY_SIZE(blob_name)];
} fw[] = {
#define _FW_ENTRY(a, b) { \
.name = a, \
@@ -110,7 +110,7 @@ static void drx_release_fw(struct drx397xD_state *s)
static int drx_load_fw(struct drx397xD_state *s, fw_ix_t ix)
{
- u8 *data;
+ const u8 *data;
size_t size, len;
int i = 0, j, rc = -EINVAL;
@@ -194,7 +194,7 @@ static int drx_load_fw(struct drx397xD_state *s, fw_ix_t ix)
static int write_fw(struct drx397xD_state *s, blob_ix_t ix)
{
struct i2c_msg msg = {.addr = s->config.demod_address,.flags = 0 };
- u8 *data;
+ const u8 *data;
int len, rc = 0, i = 0;
if (ix < 0 || ix >= ARRAY_SIZE(blob_name)) {
@@ -215,7 +215,7 @@ static int write_fw(struct drx397xD_state *s, blob_ix_t ix)
case 0: /* bytecode */
len = data[i++];
msg.len = len;
- msg.buf = &data[i];
+ msg.buf = (__u8 *) &data[i];
if (i2c_transfer(s->i2c, &msg, 1) != 1) {
rc = -EIO;
goto exit_rc;
diff --git a/linux/drivers/media/dvb/frontends/lgdt330x.c b/linux/drivers/media/dvb/frontends/lgdt330x.c
index 3a3658238..9a63bafc3 100644
--- a/linux/drivers/media/dvb/frontends/lgdt330x.c
+++ b/linux/drivers/media/dvb/frontends/lgdt330x.c
@@ -227,11 +227,16 @@ static int lgdt330x_init(struct dvb_frontend* fe)
0x4c, 0x14
};
- static u8 flip_lgdt3303_init_data[] = {
+ static u8 flip_1_lgdt3303_init_data[] = {
0x4c, 0x14,
0x87, 0xf3
};
+ static u8 flip_2_lgdt3303_init_data[] = {
+ 0x4c, 0x14,
+ 0x87, 0xda
+ };
+
struct lgdt330x_state* state = fe->demodulator_priv;
char *chip_name;
int err;
@@ -244,10 +249,19 @@ static int lgdt330x_init(struct dvb_frontend* fe)
break;
case LGDT3303:
chip_name = "LGDT3303";
- if (state->config->clock_polarity_flip) {
- err = i2c_write_demod_bytes(state, flip_lgdt3303_init_data,
- sizeof(flip_lgdt3303_init_data));
- } else {
+ switch (state->config->clock_polarity_flip) {
+ case 2:
+ err = i2c_write_demod_bytes(state,
+ flip_2_lgdt3303_init_data,
+ sizeof(flip_2_lgdt3303_init_data));
+ break;
+ case 1:
+ err = i2c_write_demod_bytes(state,
+ flip_1_lgdt3303_init_data,
+ sizeof(flip_1_lgdt3303_init_data));
+ break;
+ case 0:
+ default:
err = i2c_write_demod_bytes(state, lgdt3303_init_data,
sizeof(lgdt3303_init_data));
}
diff --git a/linux/drivers/media/dvb/ttpci/Makefile b/linux/drivers/media/dvb/ttpci/Makefile
index d7483f1a9..3819390b1 100644
--- a/linux/drivers/media/dvb/ttpci/Makefile
+++ b/linux/drivers/media/dvb/ttpci/Makefile
@@ -14,6 +14,7 @@ obj-$(CONFIG_DVB_BUDGET_PATCH) += budget-patch.o
obj-$(CONFIG_DVB_AV7110) += dvb-ttpci.o
EXTRA_CFLAGS += -Idrivers/media/dvb/dvb-core/ -Idrivers/media/dvb/frontends/
+EXTRA_CFLAGS += -Idrivers/media/common/tuners
hostprogs-y := fdump
diff --git a/linux/drivers/media/dvb/ttpci/av7110.c b/linux/drivers/media/dvb/ttpci/av7110.c
index 04e1bcd6a..0909eb861 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.c
+++ b/linux/drivers/media/dvb/ttpci/av7110.c
@@ -2471,11 +2471,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
get recognized before the main driver is fully loaded */
saa7146_write(dev, GPIO_CTRL, 0x500000);
-#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- av7110->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
-#else
av7110->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
-#endif
strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name));
saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
diff --git a/linux/drivers/media/dvb/ttpci/av7110.h b/linux/drivers/media/dvb/ttpci/av7110.h
index 6cbf79c3e..61e4a7569 100644
--- a/linux/drivers/media/dvb/ttpci/av7110.h
+++ b/linux/drivers/media/dvb/ttpci/av7110.h
@@ -14,9 +14,7 @@
#include <linux/dvb/osd.h>
#include <linux/dvb/net.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvbdev.h"
#include "demux.h"
@@ -154,11 +152,7 @@ struct av7110 {
/* DEBI and polled command interface */
spinlock_t debilock;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex dcomlock;
-#else
- struct semaphore dcomlock;
-#endif
volatile int debitype;
volatile int debilen;
@@ -177,11 +171,7 @@ struct av7110 {
int osdwin; /* currently active window */
u16 osdbpp[8];
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex osd_mutex;
-#else
- struct semaphore osd_mutex;
-#endif
/* CA */
@@ -206,11 +196,7 @@ struct av7110 {
struct tasklet_struct vpe_tasklet;
int fe_synced;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex pid_mutex;
-#else
- struct semaphore pid_mutex;
-#endif
int video_blank;
struct video_status videostate;
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ir.c b/linux/drivers/media/dvb/ttpci/av7110_ir.c
index 18171c051..e0f9f760a 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_ir.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_ir.c
@@ -345,7 +345,6 @@ int __devinit av7110_ir_init(struct av7110 *av7110)
input_dev->name = "DVB on-card IR receiver";
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
input_dev->phys = av7110->ir.input_phys;
input_dev->id.bustype = BUS_PCI;
input_dev->id.version = 2;
@@ -359,12 +358,7 @@ int __devinit av7110_ir_init(struct av7110 *av7110)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &av7110->dev->pci->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &av7110->dev->pci->dev;
-#else
- input_dev->dev = &av7110->dev->pci->dev;
-#endif
-#endif
#endif
/* initial keymap */
memcpy(av7110->ir.key_map, default_key_map, sizeof av7110->ir.key_map);
diff --git a/linux/drivers/media/dvb/ttpci/budget-ci.c b/linux/drivers/media/dvb/ttpci/budget-ci.c
index c254ff242..f7388e5fc 100644
--- a/linux/drivers/media/dvb/ttpci/budget-ci.c
+++ b/linux/drivers/media/dvb/ttpci/budget-ci.c
@@ -198,7 +198,6 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
input_dev->name = budget_ci->ir.name;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
input_dev->phys = budget_ci->ir.phys;
input_dev->id.bustype = BUS_PCI;
input_dev->id.version = 1;
@@ -212,12 +211,7 @@ static int msp430_ir_init(struct budget_ci *budget_ci)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,22)
input_dev->dev.parent = &saa->pci->dev;
#else
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &saa->pci->dev;
-#else
- input_dev->dev = &saa->pci->dev;
-#endif
-#endif
#endif
/* Select keymap and address */
diff --git a/linux/drivers/media/dvb/ttpci/budget-core.c b/linux/drivers/media/dvb/ttpci/budget-core.c
index 18cac4b12..6f4ddb643 100644
--- a/linux/drivers/media/dvb/ttpci/budget-core.c
+++ b/linux/drivers/media/dvb/ttpci/budget-core.c
@@ -497,11 +497,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
if (bi->type != BUDGET_FS_ACTIVY)
saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */
-#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- budget->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
-#else
budget->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
-#endif
strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));
diff --git a/linux/drivers/media/dvb/ttpci/budget.h b/linux/drivers/media/dvb/ttpci/budget.h
index 0e8e596d6..6539c0171 100644
--- a/linux/drivers/media/dvb/ttpci/budget.h
+++ b/linux/drivers/media/dvb/ttpci/budget.h
@@ -12,9 +12,7 @@
#include <linux/module.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include <media/saa7146.h>
@@ -24,13 +22,8 @@ extern int budget_debug;
#undef dprintk
#endif
-#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)
-#define dprintk(level,args...) \
- do { if ((budget_debug & level)) { printk("%s: %s(): ",__stringify(KBUILD_MODNAME), __func__); printk(args); } } while (0)
-#else
#define dprintk(level,args...) \
do { if ((budget_debug & level)) { printk("%s: %s(): ", KBUILD_MODNAME, __func__); printk(args); } } while (0)
-#endif
struct budget_info {
char *name;
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 df7add8a9..133648277 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -12,6 +12,7 @@
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/wait.h>
+#include <linux/fs.h>
#include <linux/module.h>
#include <linux/usb.h>
#include <linux/delay.h>
@@ -19,9 +20,7 @@
#include <linux/errno.h>
#include <linux/jiffies.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dvb_frontend.h"
#include "dmxdev.h"
@@ -87,13 +86,8 @@ struct ttusb {
struct dvb_net dvbnet;
/* and one for USB access. */
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex semi2c;
struct mutex semusb;
-#else
- struct semaphore semi2c;
- struct semaphore semusb;
-#endif
struct dvb_adapter adapter;
struct usb_device *dev;
@@ -995,22 +989,9 @@ static int stc_open(struct inode *inode, struct file *file)
}
static ssize_t stc_read(struct file *file, char *buf, size_t count,
- loff_t * offset)
+ loff_t *offset)
{
- int tc = count;
-
- if ((tc + *offset) > 8192)
- tc = 8192 - *offset;
-
- if (tc < 0)
- return 0;
-
- if (copy_to_user(buf, stc_firmware + *offset, tc))
- return -EFAULT;
-
- *offset += tc;
-
- return tc;
+ return simple_read_from_buffer(buf, count, offset, stc_firmware, 8192);
}
static int stc_release(struct inode *inode, struct file *file)
@@ -1698,11 +1679,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
i2c_set_adapdata(&ttusb->i2c_adap, ttusb);
-#ifdef I2C_ADAP_CLASS_TV_DIGITAL
- ttusb->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
-#else
ttusb->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
-#endif
ttusb->i2c_adap.algo = &ttusb_dec_algo;
ttusb->i2c_adap.algo_data = NULL;
ttusb->i2c_adap.dev.parent = &udev->dev;
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index 052979dc9..8491913aa 100644
--- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -33,9 +33,7 @@
#include <linux/input.h>
#include "compat.h"
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
#include "dmxdev.h"
#include "dvb_demux.h"
@@ -120,11 +118,7 @@ struct ttusb_dec {
unsigned int out_pipe;
unsigned int irq_pipe;
enum ttusb_dec_interface interface;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex usb_mutex;
-#else
- struct semaphore usb_mutex;
-#endif
void *irq_buffer;
struct urb *irq_urb;
@@ -133,11 +127,7 @@ struct ttusb_dec {
dma_addr_t iso_dma_handle;
struct urb *iso_urb[ISO_BUF_COUNT];
int iso_stream_count;
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex iso_mutex;
-#else
- struct semaphore iso_mutex;
-#endif
u8 packet[MAX_PVA_LENGTH + 4];
enum ttusb_dec_packet_type packet_type;