summaryrefslogtreecommitdiffstats
path: root/drivers/input/joystick
Commit message (Collapse)AuthorAgeFilesLines
* IRQ: Maintain regs pointer globally rather than passing to IRQ handlersDavid Howells2006-10-0511-46/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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)
* more misc typo fixesMatt LaPlante2006-10-031-1/+1
| | | | Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Input: iforce - switch to the new FF interfaceAnssi Hannula2006-07-194-238/+147
| | | | | Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: spaceball - make 4000FLX Lefty workNick Martin2006-07-191-1/+1
| | | | | | | | | | Although the Spaceball 4000FLX Lefty is already supported by the spaceball driver, it does not register properly due to SPACEBALL_MAX_ID being set too low. Increment SPACEBALL_MAX_ID such that the 4000FLX Lefty is properly recognized. Signed-off-by: Nick Martin <nim+linux@nimlabs.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - add Trust Force Feedback Race Master supportPrzemek Iskra2006-07-151-0/+1
| | | | | Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - check array bounds before accessing elementsDmitry Torokhov2006-07-061-9/+9
| | | | | | Fixes Coverity #id 864 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Remove obsolete #include <linux/config.h>Jörn Engel2006-06-302-2/+0
| | | | | Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
* Input: db9 - fix potential buffer overrunEric Sesterhenn2006-06-271-1/+1
| | | | | | | Fixes Coverity #id 483 Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - remove some pointless castsJesper Juhl2006-06-261-3/+3
| | | | | | | | | The 'private' member of struct input_dev is a void*, so no need to cast it when assigning it to a struct iforce* variable. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix potential overflows in driver/input/joystickDmitry Torokhov2006-06-2616-30/+40
| | | | | | | Change all sprintfs into snprintfs to make sure we won't stomp on data adjacent to our buffers. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - use ENOSPC instead of ENOMEMAnssi Hannula2006-06-051-4/+4
| | | | | | | | | | Use -ENOSPC instead of -ENOMEM when the iforce device doesn't have enough free memory for the new effect. All other drivers are using -ENOSPC, so this makes the behaviour coherent. Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - fix memory leakJesper Juhl2006-05-291-5/+6
| | | | | | | | | | In sw_connect we leak 'buf' and 'idbuf' when we do not leave via one of the fail* labels. This was spotted by the coverity checker. Patch is compile tested only due to lack of hardware. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - add SNES mouse supportRaphael Assenat2006-04-021-13/+70
| | | | | | | | | | | | SNES gamepads and mice share the same type of interface so they both can be connected to the parallel port using a simple interface. Adding mouse support to a gamepad driver may sound funny at first, but doing so in this case makes it possible to connect and SNES gamepads and mice at the same time, on the same port. Signed-off-by: Raphael Assenat <raph@raphnet.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: joysticks - semaphore to mutex conversionIngo Molnar2006-02-197-38/+43
| | | | | | | | | | | The conversion was generated via scripts, and the result was validated automatically via a script as well. Amijoy conversion was done by Arjan van de Ven. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - fix detection of USB devicesDmitry Torokhov2006-01-312-3/+2
| | | | | | | | Recent conversion to wait_event_interruptible_timeout() caused USB detection routine erroneously report timeouts for perfectly working devices. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: a3d - convert to dynamic input_dev allocationDmitry Torokhov2006-01-291-42/+46
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: tmdc - handle errors from input_register_device()Dmitry Torokhov2006-01-291-4/+11
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: turbografx - handle errors from input_register_device()Dmitry Torokhov2006-01-291-7/+13
| | | | | | | Also tgfx_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - handle errors from input_register_device()Dmitry Torokhov2006-01-291-6/+12
| | | | | | | Also gc_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: gamecon - fix crash when accessing deviceDmitry Torokhov2006-01-291-149/+194
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - handle errors from input_register_device()Dmitry Torokhov2006-01-291-2/+6
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: sidewinder - fix an oopsZinx Verituse2006-01-291-1/+1
| | | | | | | Dynalloc conversion strikes again... Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: db9 - handle errors from input_register_device()Dmitry Torokhov2006-01-291-5/+10
| | | | | | | Also db9_remove shouldn't be marked __exit as it is also called from __init code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: db9 - fix possible crash with Saturn gamepadsDmitry Torokhov2006-01-291-34/+36
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: grip - handle errors from input_register_device()Dmitry Torokhov2006-01-291-2/+6
| | | | | | | Also set .owner in driver structure so we'll have a link between module and driver in sysfs. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: grip - fix crash when accessing deviceDmitry Torokhov2006-01-291-0/+3
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: make needlessly global code staticAdrian Bunk2006-01-291-2/+2
| | | | | Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: iforce - do not return ENOMEM upon successful allocationAlexey Dobriyan2006-01-291-1/+1
| | | | | Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] m68k: namespace pollution fix (custom->amiga_custom)Al Viro2006-01-121-2/+2
| | | | | | | | | | in amigahw.h custom renamed to amiga_custom, in drivers with few instances the same replacement, in the rest - #define custom amiga_custom in driver itself Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Input: grip_mp - kill commented out codeDmitry Torokhov2006-01-101-9/+0
| | | | | | Kill leftovers of dynalloc conversion. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] USB: remove .owner field from struct usb_driverGreg Kroah-Hartman2006-01-041-1/+0
| | | | | | It is no longer needed, so let's remove it, saving a bit of memory. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* [PATCH] Input: warrior - fix HAT0Y axis setupDmitry Torokhov2005-12-301-1/+1
| | | | | | | | This patch fixes a typo introduced by conversion to dynamic input_dev allocation. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] fix missing includesTim Schmielau2005-10-3012-0/+12
| | | | | | | | | | | | | | | | | | | | | I recently picked up my older work to remove unnecessary #includes of sched.h, starting from a patch by Dave Jones to not include sched.h from module.h. This reduces the number of indirect includes of sched.h by ~300. Another ~400 pointless direct includes can be removed after this disentangling (patch to follow later). However, quite a few indirect includes need to be fixed up for this. In order to feed the patches through -mm with as little disturbance as possible, I've split out the fixes I accumulated up to now (complete for i386 and x86_64, more archs to follow later) and post them before the real patch. This way this large part of the patch is kept simple with only adding #includes, and all hunks are independent of each other. So if any hunk rejects or gets in the way of other patches, just drop it. My scripts will pick it up again in the next round. Signed-off-by: Tim Schmielau <tim@physik3.uni-rostock.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] drivers/input/joystick: convert to dynamic input_dev allocationDmitry Torokhov2005-10-2825-1230/+1460
| | | | | | | | | Input: convert drivers/input/joystick to dynamic input_dev allocation This is required for input_dev sysfs integration Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Manual merge with LinusDmitry Torokhov2005-09-0914-14/+14
|\
| * [PATCH] input: convert kcalloc to kzallocPekka Enberg2005-09-0714-14/+14
| | | | | | | | | | | | | | | | | | This patch converts kcalloc(1, ...) calls to use the new kzalloc() function. Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi> Cc: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* | Input: iforce - use wait_event_interruptible_timeoutVojtech Pavlik2005-09-052-25/+8
|/ | | | | | | | | | The timeout while() loops in iforce-packets.c lack a set_current_state(TASK_INTERRUPTIBLE); call. The right solution is to replace them with wait_event_interruptible_timeout(). Reported-by: Nishanth Aravamudan <nacc@us.ibm.com> Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] Amiga joystick: Fix typo introduced by the open/close race fixesGeert Uytterhoeven2005-07-131-1/+1
| | | | | Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* [PATCH] x86: i8253/i8259A lock cleanupIngo Molnar2005-06-301-1/+3
| | | | | | | | Introduce proper declarations for i8253_lock and i8259A_lock. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Input: Add a new I-Force device to the iforce driver.Marian-Nicolae V. Ion2005-05-292-0/+2
| | | | | Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: fix open/close races in joystick drivers - add a semaphoreDmitry Torokhov2005-05-294-23/+61
| | | | | | to the ones that register more than one input device. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: whitespace fixes in driver/input/joystickDmitry Torokhov2005-05-299-23/+23
| | | | Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* [PATCH] drivers/input/joystick/spaceorb.c: fix an array overflowAdrian Bunk2005-05-011-1/+1
| | | | | | | | This patch fixes an array overflow found by the Coverity checker. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
* Linux-2.6.12-rc2Linus Torvalds2005-04-1632-0/+11225
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
OpenPOWER on IntegriCloud