summaryrefslogtreecommitdiff
path: root/drivers/media/video/usbvideo/quickcam_messenger.c
AgeCommit message (Collapse)Author
2009-06-16V4L/DVB (11960): v4l: generate KEY_CAMERA instead of BTN_0 key events on ↵Lennart Poettering
input devices A bunch of V4L drivers generate BTN_0 instead of KEY_CAMERA key presses. X11 is able to handle KEY_CAMERA automatically these days while BTN_0 is not treated at all. Thus it would be of big benefit if the camera drivers would consistently generate KEY_CAMERA. Some drivers (uvc) already do, this patch updates the remaining drivers to do the same. I only possess a limited set of webcams, so this isn't tested with all cameras. The patch is rather trivial and compile tested, so I'd say it's still good enough to get merged. Signed-off-by: Lennart Poettering <mzxreary@0pointer.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (10130): use USB API functions rather than constantsJulia Lawall
This set of patches introduces calls to the following set of functions: usb_endpoint_dir_in(epd) usb_endpoint_dir_out(epd) usb_endpoint_is_bulk_in(epd) usb_endpoint_is_bulk_out(epd) usb_endpoint_is_int_in(epd) usb_endpoint_is_int_out(epd) usb_endpoint_is_isoc_in(epd) usb_endpoint_is_isoc_out(epd) usb_endpoint_num(epd) usb_endpoint_type(epd) usb_endpoint_xfer_bulk(epd) usb_endpoint_xfer_control(epd) usb_endpoint_xfer_int(epd) usb_endpoint_xfer_isoc(epd) In some cases, introducing one of these functions is not possible, and it just replaces an explicit integer value by one of the following constants: USB_ENDPOINT_XFER_BULK USB_ENDPOINT_XFER_CONTROL USB_ENDPOINT_XFER_INT USB_ENDPOINT_XFER_ISOC An extract of the semantic patch that makes these changes is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r1@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bmAttributes & \(USB_ENDPOINT_XFERTYPE_MASK\|3\)) == - \(USB_ENDPOINT_XFER_CONTROL\|0\)) + usb_endpoint_xfer_control(epd) @r5@ struct usb_endpoint_descriptor *epd; @@ - ((epd->bEndpointAddress & \(USB_ENDPOINT_DIR_MASK\|0x80\)) == - \(USB_DIR_IN\|0x80\)) + usb_endpoint_dir_in(epd) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-30V4L/DVB (10111): quickcam_messenger.c: fix a warningMauro Carvalho Chehab
drivers/media/video/usbvideo/quickcam_messenger.c: In function ‘qcm_sensor_init’: drivers/media/video/usbvideo/quickcam_messenger.c:450: warning: operation on ‘ret’ may be undefined Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-17USB: remove warn() macro from usb media driversGreg Kroah-Hartman
USB should not be having it's own printk macros, so remove warn() and use the system-wide standard of dev_warn() wherever possible. In the few places that will not work out, use a basic printk(). Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-10-12V4L/DVB (9116): USB: remove info() macro from usb media driversGreg Kroah-Hartman
USB should not be having it's own printk macros, so remove info() and use the system-wide standard of dev_info() wherever possible. Cc: Douglas Landgraf <dougsland@gmail.com> Cc: Mike Isely <isely@pobox.com> Cc: Thierry Merle <thierry.merle@free.fr> Cc: Antoine Jacquet <royale@zerezo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-06-05V4L/DVB (7970): mix trivial endianness annotationsAl Viro
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7528): media/video/usbvideo replace remaining __FUNCTION__ occurrencesHarvey Harrison
__FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24V4L/DVB (7094): static memoryDouglas Schilling Landgraf
- Static memory is always initialized with 0. - Replaced in some cases C99 comments for /* */ Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-07Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (34 commits) Input: i8042 - non-x86 build fix Input: pxa27x_keypad - also enable on PXA3xx Input: pxa27x_keypad - add debounce_interval to the keypad platform data Input: pxa27x_keypad - use device resources for I/O memory mapping and IRQ Input: pxa27x_keypad - enable rotary encoders and direct keys Input: pxa27x_keypad - introduce pxa27x_keypad_config() Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys Input: pxa27x_keypad - remove pin configuration from the driver Input: pxa27x_keypad - rename the driver (was pxa27x_keyboard) Input: constify function pointer tables (seq_operations) Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list Input: i8042 - enable DMI quirks on x86-64 Input: i8042 - add Dritek quirk for Acer Aspire 9110 Input: add input event to APM event bridge Input: mousedev - use BIT_MASK instead of BIT Input: remove duplicate includes Input: remove cdev from input_dev structure Input: remove duplicated headers in drivers/char/keyboard.c Input: i8042 - add Dritek keyboard extension quirk Input: add Tosa keyboard driver ...
2008-02-03drivers/media/: Spelling fixesJoe Perches
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Adrian Bunk <bunk@kernel.org>
2008-01-21V4L/DVB: Don't access input_dev->private directlyDmitry Torokhov
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: Dmitry Torokhov <dtor@mail.ru> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-19get rid of input BIT* duplicate definesJiri Slaby
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: Jiri Slaby <jirislaby@gmail.com> Cc: <dtor@mail.ru> Acked-by: Jiri Kosina <jkosina@suse.cz> Cc: <lenb@kernel.org> Acked-by: Marcel Holtmann <marcel@holtmann.org> Cc: <perex@suse.cz> Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: <vernux@us.ibm.com> Cc: <malattia@linux.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-18V4L/DVB (5739): Replace C code with calls to ARRAY_SIZE macro.Robert P. J. Day
Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18V4L/DVB (5698): Input: drivers/media - switch to using input_dev->dev.parentDmitry Torokhov
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> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-10V4L/DVB (4854): Handle errors from input_register_device()Dmitry Torokhov
Also sprinkled some input_sync() throughout the code. 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: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-12-01usb: quickcam_messenger free urb cleanupMariusz Kozlowski
- usb_free_urb() cleanup Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-10-05IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells
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: David Howells <dhowells@redhat.com> (cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit)
2006-06-26[PATCH] fix "USB: move <linux/usb_input.h> to <linux/usb/input.h>"Andrew Morton
Update this driver for recent header file movement. Cc: David Brownell <david-b@pacbell.net> Cc: Greg KH <greg@kroah.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25V4L/DVB (4036): Fix some compilation warningsMauro Carvalho Chehab
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2006-06-25V4L/DVB (4018): Usbvideo/quickcam_messenger driver v4ljayakumar.video@gmail.com
Adds a usbvideo driver for the Logitech Quickcam Messenger USB webcam. Signed-off-by: Jaya Kumar <jayakumar.video@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>