summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c
AgeCommit message (Collapse)Author
2008-11-12ttusb_dec: Add NULL pointer validationDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@linuxtv.org> Added validation for NULL pointer Priority: high Signed-off-by: Douglas Schilling Landgraf <dougsland@linuxtv.org>
2008-08-25V4L/DVB: follow lspci device/vendor styleMauro Carvalho Chehab
From: Bjorn Helgaas <bjorn.helgaas@hp.com> Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format used by lspci(8). Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-08-04v4l: fix compile errors/warnings.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-24backport commit 0a2a736afa91e8a0402c9dbdaf2ee28481a50bd3Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: David Woodhouse <dwmw2@infradead.org> Date: Thu May 29 19:50:06 2008 +0300 ttusb-budget: use request_firmware() This patch will keep using the enclosed .h firmware for out-of-kernel compilations. For in-kernel compilation, it will use the firmware on a .bin file that is linkedited together with dvb-ttusb-budget target. On both cases, the firmware will be inside dvb-ttusb-budget.ko module. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-08v4l-dvb: remove support for kernels < 2.6.16Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 4 removes the compatibility support for kernels < 2.6.16. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-05-21 ttusb endianness annotations and fixesMauro Carvalho Chehab
From: Al Viro <viro@ftp.linux.org.uk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-09Adds selectable adapter numbers as per module optionMichael Krufky
From: Janne Grunau <janne-dvb@grunau.be> The adapter_nr module options can be used to allocate static adapter numbers on a driver level. It avoids problems with changing DVB apapter numbers after warm/cold boot or device unplugging and repluging. Each driver holds DVB_MAX_ADAPTER long array of the preferred order of adapter numbers. options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a reversed allocation of adapter numbers. With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If both are already in use it will allocate the lowest free adapter number. Signed-off-by: Janne Grunau <janne-dvb@grunau.be> Acked-by: Hermann Pitton <hermann.pitton@arcor.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2008-04-08media/dvb/ttusb-dec replace remaining __FUNCTION__ occurrencesMichael Krufky
From: Harvey Harrison <harvey.harrison@gmail.com> __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-11-02backport changeset 7b19ada2ed3c1eccb9fe94d74b05e1428224663dMauro Carvalho Chehab
kernel-sync: Author: Jiri Slaby <jirislaby@gmail.com> Date: Thu Oct 18 23:40:32 2007 -0700 get rid of input BIT* duplicate defines get rid of input BIT* duplicate defines use newly global defined macros for input layer. Also remove includes of input.h from non-input sources only for BIT macro definiton. Define the macro temporarily in local manner, all those local definitons will be removed further in this patchset (to not break bisecting). BIT macro will be globally defined (1<<x) Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-08-21Cleanup: remove linux/moduleparam.h from drivers/media filesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This patch removes all occurences of moduleparm.h from drivers/media files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-01-30compat: Handle input_register_device() change and some othersTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> input_register_device() was changed to return an error code instead of being void in 2.6.15. Handle it with a macro wrapper in config.h. For this to work, linux/input.h must be included before config.h. This required some trivial header re-ordering in budget-ci.c and ttusb_dec.c. In kernel 2.6.15-rc1 a helper function called setup_timer() was added to linux/timer.h. Add to compat.h, but require that linux/timer.h be included first to give the definition of struct timer_list. A new 4GB DMA zone, __GFP_DMA32, was added in 2.6.15-rc2. Alias it to __GFP_DMA on older kernels. Handle another 2.6.15 "input_dev->dev to input_dev->cdev.dev" change for some recently added code in cinergyT2.c. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2006-12-16Backported several changes from kernel 2.6.19-git seriesMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Main changes: - There were several checks for usb release routines that were removed, since the routine itself checks for null values: usb_free_urb, usb_kill_urb, usb_unlink_urb Should be checked if this really happens on older kernels. - updated sound/oss/btaudio.c - replaced SLAB_ATOMIC to GFP_ATOMIC Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-11-20Handle errors from input_register_device()Mauro Carvalho Chehab
From: Dmitry Torokhov <dtor@insightbb.com> Also sprinkled some input_sync() throughout the code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Ricardo Cerqueira <v4l@cerqueira.org> Acked-by: Oliver Endriss <o.endriss@gmx.de> Acked-by: Andrew de Quincey <adq_dvb@lidskialf.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-21IRQ: Maintain regs pointer globally rather than passing to IRQ handlersMauro Carvalho Chehab
Kernel-sync: This patch is required to allow compilation of the tree with kernel 2.6.19. This is the original description of the original patch, signed by David Howells <dhowells@redhat.com>: Maintain a per-CPU global "struct pt_regs *" variable which can be used instead of passing regs around manually through all ~1800 interrupt handlers in the Linux kernel. The regs pointer is used in few places, but it potentially costs both stack space and code to pass it around. On the FRV arch, removing the regs parameter from all the genirq function results in a 20% speed up of the IRQ exit path (ie: from leaving timer_interrupt() to leaving do_IRQ()). Where appropriate, an arch may override the generic storage facility and do something different with the variable. On FRV, for instance, the address is maintained in GR28 at all times inside the kernel as part of general exception handling. Having looked over the code, it appears that the parameter may be handed down through up to twenty or so layers of functions. Consider a USB character device attached to a USB hub, attached to a USB controller that posts its interrupts through a cascaded auxiliary interrupt controller. A character device driver may want to pass regs to the sysrq handler through the input layer which adds another few layers of parameter passing. I've build this code with allyesconfig for x86_64 and i386. I've runtested the main part of the code on FRV and i386, though I can't test most of the drivers. I've also done partial conversion for powerpc and MIPS - these at least compile with minimal configurations. This will affect all archs. Mostly the changes should be relatively easy. Take do_IRQ(), store the regs pointer at the beginning, saving the old one: struct pt_regs *old_regs = set_irq_regs(regs); And put the old one back at the end: set_irq_regs(old_regs); Don't pass regs through to generic_handle_irq() or __do_IRQ(). In timer_interrupt(), this sort of change will be necessary: - update_process_times(user_mode(regs)); - profile_tick(CPU_PROFILING, regs); + update_process_times(user_mode(get_irq_regs())); + profile_tick(CPU_PROFILING); I'd like to move update_process_times()'s use of get_irq_regs() into itself, except that i386, alone of the archs, uses something other than user_mode(). Some notes on the interrupt handling in the drivers: (*) input_dev() is now gone entirely. The regs pointer is no longer stored in the input_dev struct. (*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does something different depending on whether it's been supplied with a regs pointer or not. (*) Various IRQ handler function pointers have been moved to type irq_handler_t. Signed-Off-By: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-10-04USB: Dealias -110 code (more complete)Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Apply the relevant parts of a patch from Pete Zaitcev <zaitcev@redhat.com> kernel-sync: Original description: The purpose of this patch is to split off the case when a device does not reply on the lower level (which is reported by HC hardware), and a case when the device accepted the request, but does not reply at upper level. This redefinition allows to diagnose issues easier, without asking the user if the -110 happened "immediately". The usbmon splits such cases already thanks to its timestamp, but it's not always available. I adjusted all drivers which I found affected (by searching for "urb"). Out of tree drivers may suffer a little bit, but I do not expect much breakage. At worst they may print a few messages. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-28Convert DVB devices to use dvb_attach()Andrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Only devices using > 1 frontend were ported; ones which did not are left using static binding. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Acked-by: Michael Krufky <mkrufky@linuxtv.org> Acked-by: Trent Piepho <xyzzy@speakeasy.org>
2006-05-14Change dvb_frontend_ops to be a real field instead of a pointer field inside ↵Patrick Boettcher
dvb_frontend From: Patrick Boettcher <pb@linuxtv.org> The dvb_frontend_ops is a pointer inside dvb_frontend. That's why every demod-driver is having a field of dvb_frontend_ops in its private-state-struct and using the reference for filling the pointer-field in dvb_frontend. - It saves at least two lines of code per demod-driver, - reduces object size (one less dereference per frontend_ops-access), - be coherent with dvb_tuner_ops, - makes it a little bit easier for newbies to understand how it works and - avoids stupid mistakes because you would have to copy the dvb_frontend_ops always, before you could assign the static pointer directly, which was dangerous. Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
2006-04-10Add sysfs device links to dvb devicesAndrew de Quincey
From: Andrew de Quincey <adq_dvb@lidskialf.net> Currently in /sys/class/dvb/dvbX.demuxY/ we have: dev uevent With the patch, we have (for a PCI DVB device): dev device -> ../../../devices/pci0000:00/0000:00:1e.0/0000:03:0d.0 uevent So userspace tools can (finally) work out which physical device a DVB adapter refers to. Previously you had to kinda look through dmesg and hope that it hadn't been dumped out of the buffer. This makes debugging a lot easier if the system has been up for a long time! This is done by adding an extra 'struct device *' parameter to dvb_register_adapter(). It will work with any kind of standard linux 'device'. Additionally, if someone has an embedded system which does things differently, they can simply supply 'NULL' and the behaviour will be as before - the link will simply not appear. Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net> Ack'd-by: Manu Abraham <manu@linuxtv.org> Acked-by: Michael Krufky <mkrufky@linuxtv.org>
2006-02-06sem2mutex: drivers/media/, #2Mauro Carvalho Chehab
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Kernel-sync from patch 3318b Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-01-11From: Panagiotis Issaris <takis@issaris.org>Mauro Carvalho Chehab
Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. kernel-sync Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2005-12-09TTUSB DEC driver patch roundupAlex Woods
From: Alex Woods <linux-dvb@giblets.org> Collection of patches from Peter Beutner addressing: - add symbolrates to the DVB-S frontend description - fix capability flags in DVB-S frontend describtion - remove some void casts - disable zig-zag scanning as it makes no sense for DVB-T - set sensible min_delay value - return an error for requested filter types the driver can't handle Signed-off-by: Peter Beutner <p.beutner@gmx.net> Signed-off-by: Alex Woods <linux-dvb@giblets.org>
2005-12-04Backport of Dmitry Torokhov's input layer changes at mainline kernelRicardo Cerqueira
From: Ricardo Cerqueira <v4l@cerqueira.org> kernel-sync Ported changes by Dmitry Torokhov <dtor_core@ameritech.net> and added backwards compatibility checks for kernels < 2.6.15 Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org>
2005-11-26Whitespaces cleanups.Mauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
2005-07-16Remove all #include <linux/version.h> and all referencesJohannes Stezenbach
to LINUX_VERSION_CODE and KERNEL_VERSION. Based on patch by Olaf Hering. Signed-off-by: Olaf Hering <olh@suse.de> Signed-off-by: Johannes Stezenbach <js@linuxtv.org>
2005-06-19backport of 2.6.12 changes to match other API changes (i2c, usb)Johannes Stezenbach
2005-05-28add missing release_firmware() calls to fix memory leakJohannes Stezenbach
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
2005-05-05whitespace cleanup from kernelJohannes Stezenbach
2005-04-23patch by Adrian Bunk:Johannes Stezenbach
- make needlessly global code static - #if 0 the following unused global functions: - ttpci/av7110_hw.c: av7110_reset_arm - ttpci/av7110_hw.c: av7110_send_ci_cmd - frontends/mt352.[ch]: drop mt352_read Signed-off-by: Adrian Bunk <bunk@stusta.de>
2005-03-19Cleanup patch from Peter Beutner:Alex Woods
- unregister the input device on disconnect and move cleanup stuff of the RC to own function - keymap should be static not const - set up keymap correctly and completly for input device plus a more cosmetic one: - usb endpoints are only 4bit numbers[0...15], the 8th bit only specifies the direction and is set by the snd/rcvxxxpipe() macro
2005-03-17ttusb-dec: follow dvb_register_adapter changes in dvbdev.[ch]Andreas Oberritter
2005-03-12a few more whitespace cleanupsJohannes Stezenbach
2005-03-02whitespace cleanup (remove ws at eol, sync with changes in mainline kernel)Johannes Stezenbach
2005-02-21Add IR support added by Peter Beutner <p.beutner@gmx.net>Alex Woods
2005-02-08Use alternative interface. Asks for less bandwidth and therefore works withAlex Woods
OHCI as well as UHCI.
2005-01-21various backport from 2.6.11-rc1:Michael Hunold
- replace static spinlock initializations with spin_lock_init() - add le16_to_cpu() macros to various values aquired via USB - add __user annotations to user space pointers
2005-01-09Remove backward compatibility bitsAlex Woods
2005-01-09Use usb_kill_urb instead of usb_unlink_urb for kernels greater than 2.6.7.Alex Woods
2004-11-17patch by Adrian Bunk:Johannes Stezenbach
DVB_TTUSB_DEC selects CRC32, do the #ifdefs can be removed.
2004-10-28Imported FE_REFACTORING to HEADAndrew de Quincy
2004-10-08New 2000T type model number (70013)Alex Woods
2004-09-18- use correct format specifier for printing out firmware sizeMichael Hunold
2004-08-24- replace dvb_unregister_frontend_new() with dvb_unregister_frontend()Michael Hunold
2004-08-18- forgot to remove all occurences of "#include "dvb_functions.h" which is ↵Michael Hunold
included just everywhere - remove dvb_i2c.[ch], it's not needed anymore - rename dvb_register_frontend_new() to dvb_register_frontend() -
2004-08-18- convert to new frontend functions, tooMichael Hunold
2004-08-08patch by Martin Binder: #include <linux/moduleparam.h> where necessaryJohannes Stezenbach
to make it compile with the SuSE 9.1 kernel
2004-07-31merge back various cleanups from mainline kernel:Johannes Stezenbach
- sparse annotiations (viro) - NULL noise removal (viro) - #if where #ifdef should've been (saa7146) (viro) - convert private ABS() to kernel's abs() (rddunlap) - dvb_register_i2c_device() locking fix for -ENOMEM (akpm) - dvb_register_i2c_bus() locking fix for -ENOMEM (akpm)
2004-07-30 - More MODULE_PARM -> module_param changes, all should be corrected now.Kenneth Aafloy
- Remove unused av7110 DEBUG_VARIABLE.
2004-05-03Remove 2.4 compat codeAlex Woods
2004-05-02DiSEqC for 3000-sAlex Woods
Update docs accordingly
2004-05-01Fix silly mistake with memsetAlex Woods