aboutsummaryrefslogtreecommitdiff
path: root/drivers/input/mousedev.c
AgeCommit message (Collapse)Author
2009-03-16Rationalize fasync return valuesJonathan Corbet
Most fasync implementations do something like: return fasync_helper(...); But fasync_helper() will return a positive value at times - a feature used in at least one place. Thus, a number of other drivers do: err = fasync_helper(...); if (err < 0) return err; return 0; In the interests of consistency and more concise code, it makes sense to map positive return values onto zero where ->fasync() is called. Cc: Al Viro <viro@ZenIV.linux.org.uk> Signed-off-by: Jonathan Corbet <corbet@lwn.net>
2008-12-20Merge commit 'v2.6.28-rc9' into nextDmitry Torokhov
2008-11-01saner FASYNC handling on file closeAl Viro
As it is, all instances of ->release() for files that have ->fasync() need to remember to evict file from fasync lists; forgetting that creates a hole and we actually have a bunch that *does* forget. So let's keep our lives simple - let __fput() check FASYNC in file->f_flags and call ->fasync() there if it's been set. And lose that crap in ->release() instances - leaving it there is still valid, but we don't have to bother anymore. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-10-30Input: struct device - replace bus_id with dev_name(), dev_set_name()Kay Sievers
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-07-02mousedev: BKL pushdownArnd Bergmann
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
2008-04-01Input: make sure input interfaces pin parent input devicesDmitry Torokhov
Recent driver core change causes references to parent devices being dropped early, at device_del() time, as opposed to when all children are freed. This causes oops in evdev with grabbed devices. Take the reference to the parent input device ourselves to ensure that it stays around long enough. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-30Input: mousedev - use BIT_MASK instead of BITDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-21Input: drop redundant includes of moduleparam.hJulia Lawall
Drop #include <linux/moduleparam.h> in files that also include linux/module.h, since module.h includes moduleparam.h already. Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2008-01-17Input: mousedev - handle mice that use absolute coordinatesMicah Parrish
Devices like the HP Integrated Remote Console Virtual Mouse, which are standard equipment on all Proliant and Integrity servers, produce absolute coordinates instead of relative coordinates. This is done to synchronize the position of the mouse cursor on the client desktop with the mouse cursor position on the server. Mousedev is not designed to pass those absolute events directly to X, but it can translate them into relative movements. It currently does this for tablet like devices and touchpads. This patch merely tells it to also include a device with ABS_X, ABS_Y, and mouse buttons in its list of devices to process input for. This patch enables the mouse pointer to move when using the remote console. Signed-off-by: Micah Parrish <micah.parrish@hp.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
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-10-13Input: use full RCU APIDmitry Torokhov
RT guys alerted me to the fact that in their tree spinlocks are preemptible and it is better to use full RCU API (rcu_read_lock()/rcu_read_unlock()) to be safe. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-10-12Input: fix open count handling in input interfacesOliver Neukum
If input_open_device() fails we should not leave interfaces marked as opened. Signed-off-by: Oliver Neukum <oneukum@suse.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-08-30Input: mousedev - implement proper lockingDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-07-10Input: convert from class devices to standard devicesDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-06-04Merge 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: Input: reduce raciness when input handlers disconnect Input: ucb1x00 - do not access input_dev->private directly Input: logips2pp - fix typo in Kconfig Input: db9 - do not ignore dev2 module parameter
2007-06-03Input: reduce raciness when input handlers disconnectDmitry Torokhov
There is a race between input handler's release() and disconnect() methods: when input handler disconnects it wakes up all regular users and then process to walk user list to wake up async. users. While disconnect() walks the list release() removes elements of the same list causing oopses. While this is not a substibute for proper locking we can reduce odds of getting an oops if we wake up normal readers after walking the list. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-05-08header cleaning: don't include smp_lock.h when not usedRandy Dunlap
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: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-04Merge branch 'for-linus' of ↵Linus Torvalds
master.kernel.org:/pub/scm/linux/kernel/git/dtor/input * 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/dtor/input: (65 commits) Input: gpio_keys - add support for switches (EV_SW) Input: cobalt_btns - convert to use polldev library Input: add skeleton for simple polled devices Input: update some documentation Input: wistron - fix typo in keymap for Acer TM610 Input: add input_set_capability() helper Input: i8042 - add Fujitsu touchscreen/touchpad PNP IDs Input: i8042 - add Panasonic CF-29 to nomux list Input: lifebook - split into 2 devices Input: lifebook - add signature of Panasonic CF-29 Input: lifebook - activate 6-byte protocol on select models Input: lifebook - work properly on Panasonic CF-18 Input: cobalt buttons - separate device and driver registration Input: ati_remote - make button repeat sensitivity configurable Input: pxa27x - do not use deprecated SA_INTERRUPT flag Input: ucb1400 - make delays configurable Input: misc devices - switch to using input_dev->dev.parent Input: joysticks - switch to using input_dev->dev.parent Input: touchscreens - switch to using input_dev->dev.parent Input: mice - switch to using input_dev->dev.parent ... Fixed up conflicts with core device model removal of "struct subsystem" manually. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-02remove "struct subsystem" as it is no longer neededGreg Kroah-Hartman
We need to work on cleaning up the relationship between kobjects, ksets and ktypes. The removal of 'struct subsystem' is the first step of this, especially as it is not really needed at all. Thanks to Kay for fixing the bugs in this patch. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2007-04-12Input: mousedev - fix sudden warps with touchpadsDmitry Torokhov
Pete Zaitcev reports that with his touchpad, if he lifts the finger and places it elsewhere, the pointer sometimes warps dramatically. This happens because we don't store coordinates unless we detect a touch so sometimes we have stale coordinates in queue (from where the finger left the pad) and averaging makes cursor to jump across the screen. The solution is to always store the latest coordinates. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12Input: handlers - handle errors from input_open_device()Dmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12Input: handlers - rename 'list' to 'client'Dmitry Torokhov
The naming convention in input handlers was very confusing - client stuctures were called lists, regular lists were also called lists making anyone looking at the code go mad. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2007-04-12Input: rework handle creation codeDmitry Torokhov
- consolidate code for binding handlers to a device - return error codes from handlers connect() methods back to input core and log failures Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-11-17Input: mousedev - remap BTN_FORWARD from BTN_LEFT to BTN_MIDDLEMarton Nemeth
In mousedev the BTN_LEFT and BTN_FORWARD were mapped to mouse button 0, causing that the user space program cannot distinguish between them through /dev/input/mice. All mice have BTN_LEFT, but not all have BTN_MIDDLE (e.g. Clevo D410J laptop). Mapping BTN_FORWARD to mouse button 2 makes the BTN_FORWARD button useful on this laptop. Signed-off-by: Marton Nemeth <nm127@freemail.hu> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-09-14Input: make input_register_handler() return error codesDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-09-14Input: constify input coreDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-26Input: fix formatting to better follow CodingStyleDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-03-14Input: use kzalloc() throughout the codeEric Sesterhenn
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2006-01-29Input: mousedev - fix memory leakKimball Murray
Apparently, "while true; do cat </dev/null >/dev/input/mice; done" causes an OOM in a short amount of time. Funny that nobody noticed, it actually is very easy to trigger just by switching between VT1 and VT7... Signed-off-by: Pete Zaitcev <zaitcev@redhat.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-12-11Input: mousedev - make module parameters visible in sysfsDmitry Torokhov
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-10-28[PATCH] INPUT: Create symlinks for backwards compatibilityGreg Kroah-Hartman
This creates symlinks in /sys/class/input/ to the nested class devices to help userspace cope with the nesting. Unfortunatly udev still needs to be updated as it can't handle symlinks properly here :( Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] INPUT: rename input_dev_class to input_class to be correct.Greg Kroah-Hartman
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] INPUT: move the input class devices under their new input_dev devicesGreg Kroah-Hartman
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] Input: kill devfs referencesDmitry Torokhov
Input: remove references to devfs from input subsystem Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-10-28[PATCH] Driver Core: fix up all callers of class_device_create()Greg Kroah-Hartman
The previous patch adding the ability to nest struct class_device changed the paramaters to the call class_device_create(). This patch fixes up all in-kernel users of the function. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-27Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/dtor/input.git manuallyLinus Torvalds
Some manual fixups required due to clashes with the PF_FREEZE cleanups.
2005-06-20[PATCH] INPUT: move to use the new class code, instead of class_simplegregkh@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-06-01Input: mousedev - do not wake up readers when receiving 0-motionDmitry Torokhov
event. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2005-05-28[PATCH] fix jumpy mouse cursor on consolePavel Machek
Do not send empty events to gpm. (Keyboards are assumed to have scroll wheel these days, that makes them part-mouse. That means typing on keyboard generates empty mouse events). From: Dmitry Torokhov <dtor_core@ameritech.net> Signed-off-by: Pavel Machek <pavel@suse.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-04-16Linux-2.6.12-rc2Linus Torvalds
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!