History log of /linux-master/drivers/input/tablet/aiptek.c
Revision Date Author Comments
# f4e7a254 02-Sep-2022 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: aiptek - switch to using dev_groups for driver-specific attributes

The driver core now has the ability to handle the creation and removal
of device-specific sysfs files, let's use it instead of registering and
unregistering attributes by hand.

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220903051119.1332808-3-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# c8eefa0f 18-Apr-2022 Colin Ian King <colin.king@intel.com>

Input: aiptek - remove redundant assignment to variable ret

Variable ret is being assigned a value that is never read, it is
being re-assigned again in either path of the if statement. The
assignment is redundant and can be removed.

Cleans up clang scan build warning:
Although the value stored to 'ret' is used in the enclosing expression,
the value is never actually read from 'ret' [deadcode.DeadStores]

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Link: https://lore.kernel.org/r/20220418142457.84708-1-colin.i.king@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 5600f698 13-Mar-2022 Pavel Skripkin <paskripkin@gmail.com>

Input: aiptek - properly check endpoint type

Syzbot reported warning in usb_submit_urb() which is caused by wrong
endpoint type. There was a check for the number of endpoints, but not
for the type of endpoint.

Fix it by replacing old desc.bNumEndpoints check with
usb_find_common_endpoints() helper for finding endpoints

Fail log:

usb 5-1: BOGUS urb xfer, pipe 1 != type 3
WARNING: CPU: 2 PID: 48 at drivers/usb/core/urb.c:502 usb_submit_urb+0xed2/0x18a0 drivers/usb/core/urb.c:502
Modules linked in:
CPU: 2 PID: 48 Comm: kworker/2:2 Not tainted 5.17.0-rc6-syzkaller-00226-g07ebd38a0da2 #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
Workqueue: usb_hub_wq hub_event
...
Call Trace:
<TASK>
aiptek_open+0xd5/0x130 drivers/input/tablet/aiptek.c:830
input_open_device+0x1bb/0x320 drivers/input/input.c:629
kbd_connect+0xfe/0x160 drivers/tty/vt/keyboard.c:1593

Fixes: 8e20cf2bce12 ("Input: aiptek - fix crash on detecting device without endpoints")
Reported-and-tested-by: syzbot+75cccf2b7da87fb6f84b@syzkaller.appspotmail.com
Signed-off-by: Pavel Skripkin <paskripkin@gmail.com>
Link: https://lore.kernel.org/r/20220308194328.26220-1-paskripkin@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 4c47097f 05-Feb-2021 Jiapeng Chong <jiapeng.chong@linux.alibaba.com>

Input: aiptek - convert sysfs sprintf/snprintf family to sysfs_emit

Fix the following coccicheck warning:

./drivers/input/tablet/aiptek.c:1629:8-16: WARNING: use scnprintf or
sprintf.

Reported-by: Abaci Robot<abaci@linux.alibaba.com>
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Link: https://lore.kernel.org/r/1612419191-1078-1-git-send-email-jiapeng.chong@linux.alibaba.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# cfa4f6a9 10-Jan-2020 Johan Hovold <johan@kernel.org>

Input: aiptek - use descriptors of current altsetting

Make sure to always use the descriptors of the current alternate setting
to avoid future issues when accessing fields that may differ between
settings.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Vladis Dronov <vdronov@redhat.com>
Link: https://lore.kernel.org/r/20191210113737.4016-4-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 3111491f 10-Jan-2020 Johan Hovold <johan@kernel.org>

Input: aiptek - fix endpoint sanity check

The driver was checking the number of endpoints of the first alternate
setting instead of the current one, something which could lead to the
driver binding to an invalid interface.

This in turn could cause the driver to misbehave or trigger a WARN() in
usb_submit_urb() that kernels with panic_on_warn set would choke on.

Fixes: 8e20cf2bce12 ("Input: aiptek - fix crash on detecting device without endpoints")
Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Vladis Dronov <vdronov@redhat.com>
Link: https://lore.kernel.org/r/20191210113737.4016-3-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 1a59d1b8 27-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 156

Based on 1 normalized pattern(s):

this program is free software you can redistribute it and or modify
it under the terms of the gnu general public license as published by
the free software foundation either version 2 of the license or at
your option any later version this program is distributed in the
hope that it will be useful but without any warranty without even
the implied warranty of merchantability or fitness for a particular
purpose see the gnu general public license for more details you
should have received a copy of the gnu general public license along
with this program if not write to the free software foundation inc
59 temple place suite 330 boston ma 02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 1334 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.113240726@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 53fddb66 27-Jul-2018 Jia-Ju Bai <baijiaju1990@gmail.com>

Input: aiptek - replace GFP_ATOMIC with GFP_KERNEL in aiptek_probe()

aiptek_probe() is never called in atomic context. It calls
usb_alloc_coherent() with GFP_ATOMIC, which is not necessary. GFP_ATOMIC
can be replaced with GFP_KERNEL.

This is found by a static analysis tool named DCNS written by myself.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 698c03b4 16-Jan-2018 Julia Lawall <Julia.Lawall@lip6.fr>

Input: inline macros for MODULE_LICENSE, etc

Inline macro for MODULE_LICENSE to make the license information easy to
find, eg with grep. Inline the other module-related macros at the same
time.

A simplified version of the semantic patch for the MODULE_LICENSE
case is as follows: (http://coccinelle.lip6.fr/)

// <smpl>
@s@
identifier i; expression e;
@@

@@
declarer name MODULE_LICENSE;
identifier s.i;
expression s.e;
@@
MODULE_LICENSE(
- i
+ e
);
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
[dtor: added a couple of drivers missed by the script, removed a few unused
DRIVER_VERSION macros]
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# c4043b57 10-Jul-2017 Arvind Yadav <arvind.yadav.cs@gmail.com>

Input: aiptek - constify attribute_group structures

attribute_groups are not supposed to change at runtime. All functions
working with attribute_groups provided by <linux/sysfs.h> work with const
attribute_group. So mark the non-const structs as const.

File size before:
text data bss dec hex filename
9941 1560 0 11501 2ced drivers/input/tablet/aiptek.o

File size After adding 'const':
text data bss dec hex filename
10005 1496 0 11501 2ced drivers/input/tablet/aiptek.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 7c0f6ba6 24-Dec-2016 Linus Torvalds <torvalds@linux-foundation.org>

Replace <asm/uaccess.h> with <linux/uaccess.h> globally

This was entirely automated, using the script by Al:

PATT='^[[:blank:]]*#[[:blank:]]*include[[:blank:]]*<asm/uaccess.h>'
sed -i -e "s!$PATT!#include <linux/uaccess.h>!" \
$(git grep -l "$PATT"|grep -v ^include/linux/uaccess.h)

to do the replacement at the end of the merge window.

Requested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# c6309018 31-Mar-2016 Oliver Neukum <oneukum@suse.com>

Input: aiptek - stop saving struct usb_device

The device can now easily be derived from the interface.
Stop leaving a private copy.

Signed-off-by: Oliver Neukum <oneukum@suse.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 8e20cf2b 01-Dec-2015 Vladis Dronov <vdronov@redhat.com>

Input: aiptek - fix crash on detecting device without endpoints

The aiptek driver crashes in aiptek_probe() when a specially crafted USB
device without endpoints is detected. This fix adds a check that the device
has proper configuration expected by the driver. Also an error return value
is changed to more matching one in one of the error paths.

Reported-by: Ralf Spenneberg <ralf@spenneberg.net>
Signed-off-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# bf9a9f8e 06-Jan-2014 Paul Gortmaker <paul.gortmaker@windriver.com>

Input: delete non-required instances of include <linux/init.h>

None of these files are actually using any __init type directives
and hence don't need to include <linux/init.h>. Most are just a
left over from __devinit and __cpuinit removal, or simply due to
code getting copied from one driver to the next.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# 871ba51c 04-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: input: aiptek.c: fix up dev_* messages

Previously I had made the struct device point to the input device, but
after talking with Dmitry, he said that the USB device would make more
sense for this driver to point to. So converted it to use that instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 8fb6321b 01-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: aiptek.c: remove dbg() usage

dbg() was a very old USB-specific macro that should no longer
be used. This patch removes it from being used in the driver
and uses dev_dbg() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 383c52f3 01-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: input: aiptek.c: fix up dev_err() usage

We should always reference the input device for dev_err(), not the USB
device. Fix up the places where I got this wrong.

Reported-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 1f80bb94 25-Apr-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org>

USB: aiptek.c: remove err() usage

err() was a very old USB-specific macro that I thought had
gone away. This patch removes it from being used in the
driver and uses dev_err() instead.

CC: Dmitry Torokhov <dmitry.torokhov@gmail.com>
CC: Jesper Juhl <jj@chaosbits.net>
CC: JJ Ding <dgdunix@gmail.com>
CC: Edwin van Vliet <edwin@cheatah.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# 482d74ce 23-Apr-2012 Julia Lawall <Julia.Lawall@lip6.fr>

Input: aiptek - adjust error-handling code label

At the point of this error-handling code, aiptek->urb has been allocated,
and it does not appear to be less necessary to free it here than in the
error-handling code just below.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 08642e7c 18-Nov-2011 Greg Kroah-Hartman <gregkh@suse.de>

USB: convert drivers/input/* to use module_usb_driver()

This converts the drivers in drivers/input/* to use the
module_usb_driver() macro which makes the code smaller and a bit
simpler.

Added bonus is that it removes some unneeded kernel log messages about
drivers loading and/or unloading.

Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Ville Syrjala <syrjala@sci.fi>
Cc: Henk Vergonet <Henk.Vergonet@gmail.com>
Cc: Alessandro Rubini <rubini@ipvvis.unipv.it>
Cc: Henrik Rydberg <rydberg@euromail.se>
Cc: "Magnus Hörlin" <magnus@alefors.se>
Cc: Chris Moeller <kode54@gmail.c>
Cc: Christoph Fritz <chf.fritz@googlemail.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Edwin van Vliet <edwin@cheatah.nl>
Cc: Ping Cheng <pingc@wacom.com>
Cc: Eduard Hasenleithner <eduard@hasenleithner.at>
Cc: Alexander Strakh <strakh@ispras.ru>
Cc: Glenn Sommer <gsommer@datanordisk.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 76496e7a 09-Nov-2011 JJ Ding <dgdunix@gmail.com>

Input: convert obsolete strict_strtox to kstrtox

With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox
as obsolete. Convert all remaining such uses in drivers/input/.

Also change long to appropriate types, and return error conditions
from kstrtox separately, as Dmitry sugguests.

Signed-off-by: JJ Ding <dgdunix@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# eadba0c9 10-Jul-2011 Edwin van Vliet <edwin@cheatah.nl>

Input: aiptek - remove double define

Constant AIPTEK_TOOL_BUTTON_PEN_MODE was defined twice.

Signed-off-by: Edwin van Vliet <edwin@cheatah.nl>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 6f07d31e 15-Nov-2010 Dmitry Torokhov <dmitry.torokhov@gmail.com>

Input: aiptek - tighten up permissions on sysfs attributes

Sysfs attributes affecting device behavior should not be, by default,
world-writeable. If distributions want to allow console users access
these attributes they need to employ udev and friends to adjust
permissions as needed.

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


# 987a6c02 02-Aug-2010 Daniel Mack <daniel@caiaq.de>

Input: switch to input_abs_*() access functions

Change all call sites in drivers/input to not access the ABS axis
information directly anymore. Make them use the access helpers instead.

Also use input_set_abs_params() when possible.
Did some code refactoring as I was on it.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 997ea58e 12-Apr-2010 Daniel Mack <daniel@caiaq.de>

USB: rename usb_buffer_alloc() and usb_buffer_free() users

For more clearance what the functions actually do,

usb_buffer_alloc() is renamed to usb_alloc_coherent()
usb_buffer_free() is renamed to usb_free_coherent()

They should only be used in code which really needs DMA coherency.

All call sites have been changed accordingly, except for staging
drivers.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Pedro Ribeiro <pedrib@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# c9404c9c 18-Dec-2009 Adam Buchbinder <adam.buchbinder@gmail.com>

Fix misspelling of "should" and "shouldn't" in comments.

Some comments misspell "should" or "shouldn't"; this fixes them. No code changes.

Signed-off-by: Adam Buchbinder <adam.buchbinder@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 899ef6e7 18-Aug-2008 Greg Kroah-Hartman <gregkh@suse.de>

USB: remove info() macro from usb input drivers

USB should not be having it's own printk macros, so remove info() and
use the system-wide standard of dev_info() wherever possible.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 1817b169 14-Aug-2008 Greg Kroah-Hartman <gregkh@suse.de>

USB: remove warn() macro from usb input drivers

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: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>


# 160f1fef 09-Aug-2008 Joe Rouvier <joe@rouvier.org>

Input: convert drivers to use strict_strtoul()

strict_strtoul() allows newline character at the end of the the input
string and therefore is more user-friendly.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>


# ea3e6c59 05-May-2008 Harvey Harrison <harvey.harrison@gmail.com>

Input: replace remaining __FUNCTION__ occurrences

__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 858ad08c 29-Apr-2008 Harvey Harrison <harvey.harrison@gmail.com>

input: use get_unaligned_* helpers

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# a32bcc45 10-Mar-2008 Guryanov Dmitry <guryanov@dgap.mipt.ru>

Input: aiptek - add support for Genius G-PEN 560 tablet

USBHID driver only supports relative mode with this tablet so let aiptek
module handle it.

Signed-off-by: Dmitry Guryanov <guryanov@dgap.mipt.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 5035522d 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - update driver version

Update credits and version number to 2.3

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 1e7b3fae 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - rework the function key code

Function keys (also called macro keys) code corrected. Using a
lastMacro variable to keep track of key currently pressed. This
ensures proper resetting when dragging the pen in the drawing
area or to another key. Also suppress sending pressure reports
when over the macro key area.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 0112db36 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - tolerate newlines in sysfs files

Now echo "some value" > /sys/......./somefile is also acceptable.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# b3b6cf1d 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - correct the tool switching code

Now the old tool is remembered, and reset when a new tool is
selected via the sysfs files.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# da9fda43 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - use only absolute misc reports

To get an on - off reporting for proximity, absolute misc reports are
used. The mixture of absolute and relative reports is awkward

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 6125a400 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - put sensible warnings in probe

Added warnings to the points where the tablet probe may fail

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 1a54f49e 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - use set_bit instead of bitwise or

Have to use set_bit since some bit values are over 32, and bitwise or
won't work on these. To be safe for the future too, use set_bit for all
input dev capabilities

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 0038cae0 20-May-2007 Mark Vytlacil <mrv@wi.rr.com>

Input: aiptek - fix relative mode parsing

Corrections to relative mode, was looking at wrong byte

Signed-off-by: Mark Vytlacil <mrv@wi.rr.com>
Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# ce0982ed 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - fixed mouse button defines

Mouse button defines tested the wrong bits, now fixed

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# fe981f23 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - correct the proximity and validity checks

Calculation of proximity bit and of data valid bits were reversed for
stylus reports.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 2fe57416 20-May-2007 Rene van Paassen <rene.vanpaassen@gmail.com>

Input: aiptek - correct documentation on reports

Small fix that corrects the documentation on the report byte
format produced by the mouse

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 33936fa6 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - use array to list all buttons

When setting up input device use an array to list all the buttons
instead of setting every bit separately.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 37767b66 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - kill aiptek_convert_from_2s_complement()

There is no reason to do that, just tell the compiler that
we are dealing with signed values in buffer, that's it.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# cd438a58 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - use maps in attributes

Use maps to convert for strings to internal constants and vice versa
in aiptek's sysfs attribute methods instead of open-coding it. This
results in smaller code that is also easier to maintain.

[Rene: fix a typo - stylys instead of stylus]

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 02fb6c38 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - do not check for NULL in attribute methods

It makes no sense to check for NULL in attribute methods -
we do usb_set_intfdata before creating attributes and once
attributes have been removed we are guaranteed to not be
called.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# b087e1f3 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - use attribute group

Use attribute group to simplify error handling and reduce code.

[Rene: add missing NULL to properly terminate aiptek_attributes]

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 5c659c62 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - remove vendor and product attributes from sysfs

They are already exported by input core; there is no need to do it twice.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 9b40ed08 20-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: aiptek - do not try to export associated event device

Do not try to export via sysfs associated event device - it does not
work when evdev is a module that is loaded after aiptek; also it pokes
too deply into input core internals.

Userspace should rely on udev to set up permanent device name for
the tablet.

Signed-off-by: Rene van Paassen <rene.vanpaassen@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>


# 4104d13f 07-May-2007 Dmitry Torokhov <dtor@insightbb.com>

Input: move USB tablets under drivers/input/tablet

This will allow concentrating all input devices in one place
in {menu|x|q}config.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>