summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/usbvideo
AgeCommit message (Collapse)Author
2008-08-18usbvideo: add proper error check and add release functionHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-30v4l: move BKL down to the driver level.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The BKL is now moved from the video_open function in v4l2-dev.c to the various drivers. It seems about a third of the drivers already has a lock of some sort protecting the open(), another third uses video_exclusive_open (yuck!) and the last third required adding the BKL in their open function. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-26v4l2-dev: remove unused type and type2 field from video_deviceHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The type and type2 fields were unused and so could be removed. Instead add a vfl_type field that contains the type of the video device. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-25videodev: remove some CONFIG_VIDEO_V4L1_COMPAT code from v4l2-dev.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The video_device_create_file and video_device_remove_file functions can be removed from v4l2-dev.h, removing the dependency on videodev.h in v4l2-dev.h. Also removed a few more videodev.h includes that should have been videodev2.h. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-21Remove obsolete owner field from video_device struct.Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> According to an old comment this should have been removed in 2.6.15. Better late than never... Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-24This patch fixes some kernel version checks.Mauro Carvalho Chehab
From: Reinhard Schwab <reinhard.schwab@aon.at> Signed-off-by: Reinhard Schwab <reinhard.schwab@aon.at> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-24make cpia2 and vicam backward compatibleMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Probably, this is a bit overkill, but let's keep the old behavior for kernels lower than 2.6.27, until we make sure that those changes work fine also for older kernels. kernel-sync: since we don't want this patch to go to kernel Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-24backport request_firmware changesets for vicam and cpia2_coreMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Backport changeset 04a33e406a062cd1bb55014ee17a3558109a2d74 Author: David Woodhouse <dwmw2@infradead.org> Date: Mon Jun 23 11:36:23 2008 +0100 cpia2: use request_firmware() Thanks for Jaswinder Singh for converting the firmware blob itself to ihex. Backport changeset fb54be8755d386008bfadb7fc8ff89451fa3a9c9 Author: Jaswinder Singh <jaswinder@infradead.org> Date: Fri Jun 27 19:50:40 2008 +0530 vicam: use request_firmware() Although it wasn't actually using ihex records before, we use the Intel HEX record format for this firmware -- because that gives us a simple way to split it into separate chunks internally as we need, without loading each part as a separate file. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20videodev: move some functions from v4l2-dev.h to v4l2-common.h or v4l2-ioctl.hHans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The functions in a header should not belong to another module. The prio functions belong to v4l2-common.c, so move them to v4l2-common.h. The ioctl functions belong to v4l2-ioctl.c, so create a new v4l2-ioctl.h header and move those functions to it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-07-20videodev: rename 'dev' to 'parent'Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> The field 'dev' is not the video device, but the parent of the video device. Rename accordingly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
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-07-08v4l-dvb: remove support for kernels < 2.6.13Hans Verkuil
From: Hans Verkuil <hverkuil@xs4all.nl> Phase 3 of the compat cleanup. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
2008-05-21 mix trivial endianness annotationsMauro 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-05-02backport commit bdf4bbaaee3d4b8f555658333cbce1affe9070fbMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Harvey Harrison <harvey.harrison@gmail.com> Date: Wed Apr 30 00:54:55 2008 -0700 Add macros similar to min/max/min_t/max_t Also, change the variable names used in the min/max macros to avoid shadowed variable warnings when min/max min_t/max_t are nested. Small formatting changes to make all the macros have a similar form. [akpm@linux-foundation.org: coding-style fixes] [akpm@linux-foundation.org: fix v4l build] Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-16 ibmcam: improve support for the IBM PC Camera ProMauro Carvalho Chehab
From: David Hilvert <dhilvert@gmail.com> This patch modifies Dmitri's original ibmcam driver for Linux to improve support for the IBM PC Camera Pro. It may also offer improved support for other models classified by the driver as 'Model 3', such as the IBM PC Camera Pro Max. See http://auricle.dyndns.org/xvp610/ Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-08media/video/usbvideo 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>
2008-03-27Backport commit a512a8cc20bbf74700d368ecb0a61dd9d8f1df48Mauro Carvalho Chehab
kernel-sync: Original description: Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Sun Nov 4 00:50:19 2007 -0400 V4L/DVB: Don't access input_dev->private directly Drivers should use input_{get|set}_drvdata() instead of accessing input_dev->provate directly, but since these drivers do not actually use the data stored there we can simply remove the assignments. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-23[PATCH] add macro validation for v4l_compat_ioctl32.Douglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> Added macro CONFIG_COMPAT for v4l_compat_ioctl32. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
2008-03-10usb-video: checkpatch fixesMauro Carvalho Chehab
From: Andrew Morton <akpm@linux-foundation.org> Please run checkpatch prior to sending patches Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-03-07 usb video: add a device link to usbvideo devices, else hal will ignore themMauro Carvalho Chehab
From: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Pascal Terjan <pterjan@mandriva.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-05backport kernel commit c84e6036ba7177a404cc860cb5a440e06fad92ddMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Original changelog: Author: Joe Perches <joe@perches.com> Date: Sun Feb 3 17:18:59 2008 +0200 drivers/media/: Spelling fixes kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-27[PATCH] static memoryDouglas Schilling Landgraf
From: Douglas Schilling Landgraf <dougsland@gmail.com> - Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
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-11-02backport changeset 96de0e252cedffad61b3cb5e05662c591898e69aMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Author: Jan Engelhardt <jengelh@gmx.de> Date: Fri Oct 19 23:21:04 2007 +0200 Convert files to UTF-8 and some cleanups * Convert files to UTF-8. * Also correct some people's names (one example is Eißfeldt, which was found in a source file. Given that the author used an ß at all in a source file indicates that the real name has in fact a 'ß' and not an 'ss', which is commonly used as a substitute for 'ß' when limited to 7bit.) * Correct town names (Goettingen -> Göttingen) * Update Eberhard Mönkeberg's address (http://lkml.org/lkml/2007/1/8/313) Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-15v4l core: remove the unused .hardware V4L1 fieldMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> struct video_device used to define a .hardware field. While initialized on severl drivers, this field is never used inside V4L. However, drivers using it need to include the old V4L1 header. This seems to cause compilation troubles with some random configs. Better just to remove it from all drivers. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-20Backport changeset from kernel mainstreamMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: The original patch from Yoann Padioleau <padator@wanadoo.fr>: Transform some calls to kmalloc/memset to a single kzalloc (or kcalloc). Here is a short excerpt of the semantic patch performing this transformation: @@ type T2; expression x; identifier f,fld; expression E; expression E1,E2; expression e1,e2,e3,y; statement S; @@ x = - kmalloc + kzalloc (E1,E2) ... when != \(x->fld=E;\|y=f(...,x,...);\|f(...,x,...);\|x=E;\|while(...) S\|for(e1;e2;e3) S\) - memset((T2)x,0,E1); @@ expression E1,E2,E3; @@ - kzalloc(E1 * E2,E3) + kcalloc(E1,E2,E3) Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-02Fix v4l-dvb backward compatibilityMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Due to several internal API changes on kernel, kernel backward compatibility were lost. Basically, compat.h should be the last include for it to work properly. This patch basically reorders kernel headers to allow backward compat to work fine. Also: Some includes were added after some non-include macros, on old drivers. Better to keep all includes at the beginning of the files. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-06-07Remove obsoleted support for PROC_FS on vicam.cMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Procfs support on V4L were converted to sysfs support by a pre-2.6 patch: http://www.ussg.iu.edu/hypermail/linux/kernel/0307.1/2356.html There's no sense on keeping the dead code inside vicam.c. Also,it won't work anyway, as part of proc_fs support were previously inside videodev.c. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-06-05Replace C code with calls to ARRAY_SIZE macro.Mauro Carvalho Chehab
From: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-23Input: drivers/media - switch to using input_dev->dev.parentMichael Krufky
From: Dmitry Torokhov <dtor at mail.ru> In preparation for struct class_device -> struct device input core conversion switch to using input_dev->dev.parent when specifying device position in sysfs tree. Signed-off-by: Dmitry Torokhov <dtor at mail.ru> Acked-by: Thierry Merle <thierry.merle@free.fr> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
2007-05-13Backport kernel changeset 59c51591a0ac7568824f541f57de967e88adaa07Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: The original patch is from Michael Opdenacker <michael@free-electrons.com> Fix occurrences of "the the " Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-13Backport kernel changeset e63340ae6b6205fef26b40a75673d1c9c0c8bb90Mauro Carvalho Chehab
From: Mauro Carvalho Chehab kernel-sync: The original patch description, from Randy Dunlap <randy.dunlap@oracle.com>: header cleaning: don't include smp_lock.h when not used Remove includes of <linux/smp_lock.h> where it is not used/needed. Suggested by Al Viro. Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc, sparc64, and arm (all 59 defconfigs). Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-02Use menuconfig objects II - V4LMauro Carvalho Chehab
From: Jan Engelhardt <jengelh@linux01.gwdg.de> Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-03Backed out changeset d130e8e1eb762e055371d5e3e1724d7735bad244Mauro Carvalho Chehab
Also reverting this one. V4L/DVB building system can't handle menuconfig and if/endif Kconfig items. We should first patch the building system before reapplying those two patches. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-02Use menuconfig objects II - V4LMauro Carvalho Chehab
From: Jan Engelhardt <jengelh@linux01.gwdg.de> Change Kconfig objects from "menu, config" into "menuconfig" so that the user can disable the whole feature without having to enter the menu first. Signed-off-by: Jan Engelhardt <jengelh@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-03-09Usbvideo module handlingMauro Carvalho Chehab
From: Oliver Neukum <oneukum@suse.de> Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21Backport of git changeset cd354f1ae75e6466a7e31b727faede57a1f89ca5Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a changeset from Schmielau <tim@physik3.uni-rostock.de> that removes uneeded includes for linux/sched.h Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21Backport: make file_operations constMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Backport a kernel patch by Arjan van de Ven <arjan@linux.intel.com> that made all file_operations instances const. Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-19compat: input_dev compat code for konicawc and quickcam_messengerTrent Piepho
From: Trent Piepho <xyzzy@speakeasy.org> Adjust konicawc and quickcam_messenger to use backward compat code relating to changes in the input layer in 2.6.15. They should now work in 2.6.12. Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
2007-01-07Fix quickcam communicator driver for big endian architecturesMauro Carvalho Chehab
From: Grant Likely <grant.likely@secretlab.ca> Host endianess does not affect the order that pixel rgb data comes in from the quickcam (the values are bytes, not words or longs). The driver is erroniously swapping the order of rgb values for big endian machines. This patch is needed get the Quickcam communicator working on big endian machines (tested on powerpc) Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.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-12-13getting rid of all casts of k[cmz]alloc() callsMauro Carvalho Chehab
From: "Robert P. J. Day" <rpjday@mindspring.com> Run this: ============== cut here ============== for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do echo "De-casting $f..." perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f done And then go through and reinstate those cases where code is casting pointers to non-pointers. And then drop a few hunks which conflicted with outstanding work. kernel-sync: Signed-off-by: Andrew Morton <akpm@osdl.org> CC: v4l-dvb maintainer list <v4l-dvb-maintainer@linuxtv.org> 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-09-03Adds Compro PS39U USB ID to Vicam driverMauro Carvalho Chehab
From: Bas Bloemsaat <bas.bloemsaat@gmail.com> Trivial patch to make Compro PS39U WebCam work with linux by using the vicam driver. The camera is just a vicam with another USB ID, so I added that ID to the driver, and it works now. Signed-off-by: Bas Bloemsaat <bas.bloemsaat@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-02Fix a typo on the previous patchMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-08-02Konicawc - handle errors from input_register_device()Mauro Carvalho Chehab
From: Dmitry Torokhov <dtor@insightbb.com> Compile-tested only (no hardware) Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-23Fix broken dependencies on media Kconfig Mauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-07-19Several other backports from kernel to v4l/dvb treeMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync: Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-26Include compat.h header fileMauro Carvalho Chehab
From: Mauro Carvalho Chehab <mchehab@infradead.org> kernel-sync Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>