Commit graph android_kernel_sony_sdm845/drivers/input/joystick
Message SHA1
usb: iforce-usb free urb cleanup
- usb_free_urb() cleanup

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Mariusz Kozlowski   authored and   Greg Kroah-Hartman   commited 2006-12-01 14:23:32 -08:00
8f21d119f4
Input: handle serio_register_driver() errors
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Akinobu Mita   authored and   Dmitry Torokhov   commited 2006-11-23 23:35:10 -05:00
153a9df01c
Input: joysticks - handle errors when registering input devices
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-11-05 22:40:09 -05:00
127278ce22
IRQ: Maintain regs pointer globally rather than passing to IRQ handlers
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)

David Howells   commited 2006-10-05 15:10:12 +01:00
7d12e780e0
more misc typo fixes
Signed-off-by: Adrian Bunk <bunk@stusta.de>

Matt LaPlante   authored and   Adrian Bunk   commited 2006-10-03 22:34:14 +02:00
44c09201a4
Input: iforce - switch to the new FF interface
Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Anssi Hannula   authored and   Dmitry Torokhov   commited 2006-07-19 01:40:39 -04:00
f6a01c8596
Input: spaceball - make 4000FLX Lefty work
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>

Nick Martin   authored and   Dmitry Torokhov   commited 2006-07-19 01:14:44 -04:00
2c1dd69d28
Input: iforce - add Trust Force Feedback Race Master support
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Przemek Iskra   authored and   Dmitry Torokhov   commited 2006-07-15 01:16:21 -04:00
b53174fb5a
Input: iforce - check array bounds before accessing elements
Fixes Coverity #id 864

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-07-06 23:55:00 -04:00
8d64d3722c
Remove obsolete #include <linux/config.h>
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Adrian Bunk <bunk@stusta.de>

Jörn Engel   authored and   Adrian Bunk   commited 2006-06-30 19:25:36 +02:00
6ab3d5624e
Input: db9 - fix potential buffer overrun
Fixes Coverity #id 483

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Eric Sesterhenn   authored and   Dmitry Torokhov   commited 2006-06-27 23:42:33 -04:00
0a3a6d69b7
Input: iforce - remove some pointless casts
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>

Jesper Juhl   authored and   Dmitry Torokhov   commited 2006-06-26 01:59:52 -04:00
e2e8115b54
Input: fix potential overflows in driver/input/joystick
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>

Dmitry Torokhov   commited 2006-06-26 01:45:48 -04:00
10ca4c0a62
Input: iforce - use ENOSPC instead of ENOMEM
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>

Anssi Hannula   authored and   Dmitry Torokhov   commited 2006-06-05 00:18:21 -04:00
fe65b97a58
Input: sidewinder - fix memory leak
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>

Jesper Juhl   authored and   Dmitry Torokhov   commited 2006-05-29 23:28:05 -04:00
7363cfc866
Input: gamecon - add SNES mouse support
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>

Raphael Assenat   authored and   Dmitry Torokhov   commited 2006-04-02 00:10:05 -05:00
b157d55eef
Input: joysticks - semaphore to mutex conversion
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>

Ingo Molnar   authored and   Dmitry Torokhov   commited 2006-02-19 00:22:30 -05:00
72ba9f0ce0
Input: iforce - fix detection of USB devices
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>

Dmitry Torokhov   commited 2006-01-31 01:31:07 -05:00
97d4ebfe79
Input: a3d - convert to dynamic input_dev allocation
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>

Dmitry Torokhov   commited 2006-01-29 21:52:39 -05:00
275c6ce25d
Input: tmdc - handle errors from input_register_device()
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>

Dmitry Torokhov   commited 2006-01-29 21:52:26 -05:00
4d462b9e23
Input: turbografx - handle errors from input_register_device()
Also tgfx_remove shouldn't be marked __exit as it is also called from
__init code.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:52:18 -05:00
ab52cd66ae
Input: gamecon - handle errors from input_register_device()
Also gc_remove shouldn't be marked __exit as it is also called from
__init code.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:52:11 -05:00
77fc46ca5b
Input: gamecon - fix crash when accessing device
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:52:04 -05:00
c7fd018d75
Input: sidewinder - handle errors from input_register_device()
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>

Dmitry Torokhov   commited 2006-01-29 21:51:56 -05:00
07cf779c00
Input: sidewinder - fix an oops
Dynalloc conversion strikes again...

Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Zinx Verituse   authored and   Dmitry Torokhov   commited 2006-01-29 21:51:51 -05:00
847fd5fbf7
Input: db9 - handle errors from input_register_device()
Also db9_remove shouldn't be marked __exit as it is also called from
__init code.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:51:36 -05:00
2e9d675ed2
Input: db9 - fix possible crash with Saturn gamepads
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:51:31 -05:00
84c61896bd
Input: grip - handle errors from input_register_device()
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>

Dmitry Torokhov   commited 2006-01-29 21:51:21 -05:00
0399addd71
Input: grip - fix crash when accessing device
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-29 21:51:16 -05:00
3575c34100
Input: make needlessly global code static
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Adrian Bunk   authored and   Dmitry Torokhov   commited 2006-01-29 21:51:07 -05:00
ffc6b529e8
Input: iforce - do not return ENOMEM upon successful allocation
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Alexey Dobriyan   authored and   Dmitry Torokhov   commited 2006-01-29 21:50:52 -05:00
5ae08f80ec
[PATCH] m68k: namespace pollution fix (custom->amiga_custom)
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>

Al Viro   authored and   Linus Torvalds   commited 2006-01-12 09:09:00 -08:00
b4290a23cf
Input: grip_mp - kill commented out code
Kill leftovers of dynalloc conversion.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2006-01-10 01:58:47 -05:00
ebbac7dde2
[PATCH] USB: remove .owner field from struct usb_driver
It is no longer needed, so let's remove it, saving a bit of memory.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Greg Kroah-Hartman   commited 2006-01-04 13:48:34 -08:00
75318d2d7c
[PATCH] Input: warrior - fix HAT0Y axis setup
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>

Dmitry Torokhov   authored and   Linus Torvalds   commited 2005-12-30 08:20:26 -08:00
ae5536d6f7
[PATCH] fix missing includes
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>

Tim Schmielau   authored and   Linus Torvalds   commited 2005-10-30 17:37:32 -08:00
4e57b68178
[PATCH] drivers/input/joystick: convert to dynamic input_dev allocation
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>

Dmitry Torokhov   authored and   Greg Kroah-Hartman   commited 2005-10-28 09:52:53 -07:00
17dd3f0f7a
Manual merge with Linus
Dmitry Torokhov   commited 2005-09-09 20:14:47 -05:00
d344c5e085
[PATCH] input: convert kcalloc to kzalloc
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>

Pekka Enberg   authored and   Linus Torvalds   commited 2005-09-07 16:57:45 -07:00
a97e148a8b
Input: iforce - use wait_event_interruptible_timeout
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>

Vojtech Pavlik   authored and   Dmitry Torokhov   commited 2005-09-05 00:12:39 -05:00
fb76b099f8
[PATCH] Amiga joystick: Fix typo introduced by the open/close race fixes
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Geert Uytterhoeven   authored and   Linus Torvalds   commited 2005-07-13 11:44:27 -07:00
a61caa8523
[PATCH] x86: i8253/i8259A lock cleanup
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>

Ingo Molnar   authored and   Linus Torvalds   commited 2005-06-30 08:45:10 -07:00
306e440daf
Input: Add a new I-Force device to the iforce driver.
Signed-off-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Marian-Nicolae V. Ion   authored and   Dmitry Torokhov   commited 2005-05-29 02:30:01 -05:00
18098a6c75
Input: fix open/close races in joystick drivers - add a semaphore
to the ones that register more than one input device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2005-05-29 02:29:52 -05:00
8b1a198bf1
Input: whitespace fixes in driver/input/joystick
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Dmitry Torokhov   commited 2005-05-29 02:28:55 -05:00
ab0c3443ad
[PATCH] drivers/input/joystick/spaceorb.c: fix an array overflow
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>

Adrian Bunk   authored and   Linus Torvalds   commited 2005-05-01 08:59:30 -07:00
6c207e7692
Linux-2.6.12-rc2
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!

Linus Torvalds   commited 2005-04-16 15:20:36 -07:00
1da177e4c3