Input: remove accept method from input_dev

This method used to enforce exclusive access to iforce devices,
but presenlty there are no known users of this method.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: add start() method to input handlers

The new start() method is called immediately after connect() and also
when "grabbed" device is released by its owner. This will allow input
handlers to re-synchronize state of once-grabbed device with the rest
of devices.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: introduce input_inject_event() function

Create input_inject_event() function which is to be used by input
handlers as opposed to input_event() which is reserved for drivers
implementing input devices. The difference is that if device is
"grabbed" by some process input_inject_event() will ignore events
unless sent from the handle that is currently owns the device.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: wistron - fix section reference mismatches

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: fm801-gp - fix use after free

Fixes Coverity #id 916

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: libps2 - warn instead of oopsing when passed bad arguments

This is more user-friendly and also fixes Coverity #id 249

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: iforce - check array bounds before accessing elements

Fixes Coverity #id 864

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
Input: fix list iteration in input_release_device()

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: HID - fix potential out-of-bound array access

Fixes Coverity #id 978

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: add missing handler->start() call

The start() method need to be called every time we create
a new handle. This includes not only registering new devices
but also when registering new handlers.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: hiddev - use standard list implementation

Fixes Coverity #id 303

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: keyboard - remove static variable and clean up initialization

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Input: keyboard - simplify emulate_raw() implementation

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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>
Input: serio/gameport - check whether driver core calls succeeded

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
[POWERPC] fix up front-LED Kconfig

This patch fixes the front-LED Kconfig issues I introduced while
creating it. Apparently having a dependency isn't enough to have the
select not evaluated or something like that.

The patch also changes the default configuration for pmac32 select the
default for the LED to be the IDE trigger. While I was at it, I
completely updated the defconfig and also added snd-aoa to it.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] Workaround Pegasos incorrect ISA "ranges"

The Pegasos firmware doesn't create a valid "ranges" property for the
ISA bridge, thus causing translation of ISA addresses and IO ports to
fail. This fixes it, thus re-enabling proper early serial console to
work on Pegasos.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] Fix 32 bits warning in prom_init.c

A warning is hurting my eyes when building 32 bits kernels

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
[POWERPC] Fix non-MPIC CHRPs with CONFIG_SMP set

Pseudo-CHRP machines like Pegasos without an MPIC would crash at boot if
CONFIG_SMP was set because the "smp_ops" pointer was set to MPIC related
ops unconditionally. This patch makes it NULL on machines that don't
support SMP and provides proper default behaviour in the callers when
smp_ops is NULL.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>