diff options
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvb_net.c | 8 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dvbdev.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dw2102.h | 2 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smscoreapi.c | 14 | ||||
-rw-r--r-- | linux/drivers/media/dvb/siano/smsdvb.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c | 25 | ||||
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 4 |
7 files changed, 53 insertions, 10 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_net.c b/linux/drivers/media/dvb/dvb-core/dvb_net.c index 3c0106f65..e0d60cdc4 100644 --- a/linux/drivers/media/dvb/dvb-core/dvb_net.c +++ b/linux/drivers/media/dvb/dvb-core/dvb_net.c @@ -1165,7 +1165,11 @@ static void wq_set_multicast_list (struct work_struct *work) #ifdef OLD_XMIT_LOCK /* Kernels equal or lower than 2.6.17 */ spin_lock_bh(&dev->xmit_lock); #else +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26) netif_tx_lock_bh(dev); +#else + netif_addr_lock_bh(dev); +#endif #endif if (dev->flags & IFF_PROMISC) { @@ -1194,7 +1198,11 @@ static void wq_set_multicast_list (struct work_struct *work) #ifdef OLD_XMIT_LOCK /* Kernels equal or lower than 2.6.17 */ spin_unlock_bh(&dev->xmit_lock); #else +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 26) netif_tx_unlock_bh(dev); +#else + netif_addr_unlock_bh(dev); +#endif #endif dvb_net_feed_start(dev); } diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c index e6d20310a..0820da504 100644 --- a/linux/drivers/media/dvb/dvb-core/dvbdev.c +++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c @@ -242,9 +242,15 @@ int dvb_register_device(struct dvb_adapter *adap, struct dvb_device **pdvbdev, mutex_unlock(&dvbdev_register_lock); +#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 26) + clsdev = device_create_drvdata(dvb_class, adap->device, + MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), + NULL, "dvb%d.%s%d", adap->num, dnames[type], id); +#else clsdev = device_create(dvb_class, adap->device, MKDEV(DVB_MAJOR, nums2minor(adap->num, type, id)), "dvb%d.%s%d", adap->num, dnames[type], id); +#endif if (IS_ERR(clsdev)) { printk(KERN_ERR "%s: failed to create device dvb%d.%s%d (%ld)\n", __func__, adap->num, dnames[type], id, PTR_ERR(clsdev)); diff --git a/linux/drivers/media/dvb/dvb-usb/dw2102.h b/linux/drivers/media/dvb/dvb-usb/dw2102.h index cb5873752..7a310f906 100644 --- a/linux/drivers/media/dvb/dvb-usb/dw2102.h +++ b/linux/drivers/media/dvb/dvb-usb/dw2102.h @@ -2,7 +2,7 @@ #define _DW2102_H_ #define DVB_USB_LOG_PREFIX "dw2102" -#include <dvb-usb.h> +#include "dvb-usb.h" extern int dvb_usb_dw2102_debug; #define deb_xfer(args...) dprintk(dvb_usb_dw2102_debug, 0x02, args) diff --git a/linux/drivers/media/dvb/siano/smscoreapi.c b/linux/drivers/media/dvb/siano/smscoreapi.c index d8c7304b2..4781997f6 100644 --- a/linux/drivers/media/dvb/siano/smscoreapi.c +++ b/linux/drivers/media/dvb/siano/smscoreapi.c @@ -110,12 +110,12 @@ struct smscore_registry_entry_t { enum sms_device_type_st type; }; -struct list_head g_smscore_notifyees; -struct list_head g_smscore_devices; -struct mutex g_smscore_deviceslock; +static struct list_head g_smscore_notifyees; +static struct list_head g_smscore_devices; +static struct mutex g_smscore_deviceslock; -struct list_head g_smscore_registry; -struct mutex g_smscore_registrylock; +static struct list_head g_smscore_registry; +static struct mutex g_smscore_registrylock; static int default_mode = 4; @@ -1248,7 +1248,7 @@ static int smscore_map_common_buffer(struct smscore_device_t *coredev, } #endif -int smscore_module_init(void) +static int __init smscore_module_init(void) { int rc = 0; @@ -1270,7 +1270,7 @@ int smscore_module_init(void) return rc; } -void smscore_module_exit(void) +static void __exit smscore_module_exit(void) { kmutex_lock(&g_smscore_deviceslock); diff --git a/linux/drivers/media/dvb/siano/smsdvb.c b/linux/drivers/media/dvb/siano/smsdvb.c index 2da99f19e..e64478b4e 100644 --- a/linux/drivers/media/dvb/siano/smsdvb.c +++ b/linux/drivers/media/dvb/siano/smsdvb.c @@ -27,8 +27,8 @@ DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr); -struct list_head g_smsdvb_clients; -struct mutex g_smsdvb_clientslock; +static struct list_head g_smsdvb_clients; +static struct mutex g_smsdvb_clientslock; static int smsdvb_onresponse(void *context, struct smscore_buffer_t *cb) { 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 133648277..ceae085cb 100644 --- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c +++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c @@ -21,6 +21,9 @@ #include <linux/jiffies.h> #include "compat.h" #include <linux/mutex.h> +#ifdef TTUSB_KERNEL +#include <linux/firmware.h> +#endif #include "dvb_frontend.h" #include "dmxdev.h" @@ -287,13 +290,27 @@ static int master_xfer(struct i2c_adapter* adapter, struct i2c_msg *msg, int num return i; } +#ifndef TTUSB_KERNEL #include "dvb-ttusb-dspbootcode.h" +#endif static int ttusb_boot_dsp(struct ttusb *ttusb) { +#ifdef TTUSB_KERNEL + const struct firmware *fw; +#endif int i, err; u8 b[40]; +#ifdef TTUSB_KERNEL + err = request_firmware(&fw, "ttusb-budget/dspbootcode.bin", + &ttusb->dev->dev); + if (err) { + printk(KERN_ERR "ttusb-budget: failed to request firmware\n"); + return err; + } + +#endif /* BootBlock */ b[0] = 0xaa; b[2] = 0x13; @@ -301,8 +318,13 @@ static int ttusb_boot_dsp(struct ttusb *ttusb) /* upload dsp code in 32 byte steps (36 didn't work for me ...) */ /* 32 is max packet size, no messages should be splitted. */ +#ifndef TTUSB_KERNEL for (i = 0; i < sizeof(dsp_bootcode); i += 28) { memcpy(&b[4], &dsp_bootcode[i], 28); +#else + for (i = 0; i < fw->size; i += 28) { + memcpy(&b[4], &fw->data[i], 28); +#endif b[1] = ++ttusb->c; @@ -1809,3 +1831,6 @@ module_exit(ttusb_exit); MODULE_AUTHOR("Holger Waechtler <holger@convergence.de>"); MODULE_DESCRIPTION("TTUSB DVB Driver"); MODULE_LICENSE("GPL"); +#ifdef TTUSB_KERNEL +MODULE_FIRMWARE("ttusb-budget/dspbootcode.bin"); +#endif diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 8491913aa..0fdcb19cb 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -1284,7 +1284,11 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) u8 b1[] = { 0x61 }; u8 *b; char idstring[21]; +#ifndef TTUSB_KERNEL u8 *firmware = NULL; +#else + const u8 *firmware = NULL; +#endif size_t firmware_size = 0; u16 firmware_csum = 0; __be16 firmware_csum_ns; |