Skip to content

Commit 899631c

Browse files
committed
Merge branch 'for-linus' of 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: rpckbd - fix a leak of the IRQ during init failure Input: wacom - add support for Lenovo tablet ID (0xE6) Input: i8042 - downgrade selftest error message to dbg() Input: synaptics - fix crash in synaptics_module_init() Input: spear-keyboard - fix inverted condition in interrupt handler Input: uinput - allow for 0/0 min/max on absolute axes. Input: sparse-keymap - report KEY_UNKNOWN for unknown scan codes Input: sparse-keymap - report scancodes with key events Input: h3600_ts_input - fix a spelling error Input: wacom - report resolution for pen devices Input: wacom - constify wacom_features for a new missed Bamboo models
2 parents 47e8979 + e28e1d9 commit 899631c

File tree

9 files changed

+221
-109
lines changed

9 files changed

+221
-109
lines changed

drivers/input/keyboard/spear-keyboard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static irqreturn_t spear_kbd_interrupt(int irq, void *dev_id)
6969
u8 sts, val;
7070

7171
sts = readb(kbd->io_base + STATUS_REG);
72-
if (sts & DATA_AVAIL)
72+
if (!(sts & DATA_AVAIL))
7373
return IRQ_NONE;
7474

7575
if (kbd->last_key != KEY_RESERVED) {

drivers/input/misc/uinput.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,10 +302,14 @@ static int uinput_validate_absbits(struct input_dev *dev)
302302
int retval = 0;
303303

304304
for (cnt = 0; cnt < ABS_CNT; cnt++) {
305+
int min, max;
305306
if (!test_bit(cnt, dev->absbit))
306307
continue;
307308

308-
if (input_abs_get_max(dev, cnt) <= input_abs_get_min(dev, cnt)) {
309+
min = input_abs_get_min(dev, cnt);
310+
max = input_abs_get_max(dev, cnt);
311+
312+
if ((min != 0 || max != 0) && max <= min) {
309313
printk(KERN_DEBUG
310314
"%s: invalid abs[%02x] min:%d max:%d\n",
311315
UINPUT_NAME, cnt,

drivers/input/mouse/synaptics.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,8 +836,8 @@ static const struct dmi_system_id __initconst toshiba_dmi_table[] = {
836836
},
837837

838838
},
839-
{ }
840839
#endif
840+
{ }
841841
};
842842

843843
static bool broken_olpc_ec;
@@ -851,8 +851,8 @@ static const struct dmi_system_id __initconst olpc_dmi_table[] = {
851851
DMI_MATCH(DMI_PRODUCT_NAME, "XO"),
852852
},
853853
},
854-
{ }
855854
#endif
855+
{ }
856856
};
857857

858858
void __init synaptics_module_init(void)

drivers/input/serio/i8042.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -869,15 +869,15 @@ static int i8042_controller_selftest(void)
869869
do {
870870

871871
if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
872-
pr_err("i8042 controller self test timeout\n");
872+
pr_err("i8042 controller selftest timeout\n");
873873
return -ENODEV;
874874
}
875875

876876
if (param == I8042_RET_CTL_TEST)
877877
return 0;
878878

879-
pr_err("i8042 controller selftest failed. (%#x != %#x)\n",
880-
param, I8042_RET_CTL_TEST);
879+
dbg("i8042 controller selftest: %#x != %#x\n",
880+
param, I8042_RET_CTL_TEST);
881881
msleep(50);
882882
} while (i++ < 5);
883883

@@ -891,6 +891,7 @@ static int i8042_controller_selftest(void)
891891
pr_info("giving up on controller selftest, continuing anyway...\n");
892892
return 0;
893893
#else
894+
pr_err("i8042 controller selftest failed\n");
894895
return -EIO;
895896
#endif
896897
}

drivers/input/serio/rpckbd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ static int rpckbd_open(struct serio *port)
9090

9191
if (request_irq(IRQ_KEYBOARDTX, rpckbd_tx, 0, "rpckbd", port) != 0) {
9292
printk(KERN_ERR "rpckbd.c: Could not allocate keyboard transmit IRQ\n");
93-
free_irq(IRQ_KEYBOARDRX, NULL);
93+
free_irq(IRQ_KEYBOARDRX, port);
9494
return -EBUSY;
9595
}
9696

drivers/input/sparse-keymap.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ int sparse_keymap_setup(struct input_dev *dev,
208208
}
209209
}
210210

211+
if (test_bit(EV_KEY, dev->evbit)) {
212+
__set_bit(KEY_UNKNOWN, dev->keybit);
213+
__set_bit(EV_MSC, dev->evbit);
214+
__set_bit(MSC_SCAN, dev->mscbit);
215+
}
216+
211217
dev->keycode = map;
212218
dev->keycodemax = map_size;
213219
dev->getkeycode = sparse_keymap_getkeycode;
@@ -268,6 +274,7 @@ void sparse_keymap_report_entry(struct input_dev *dev, const struct key_entry *k
268274
{
269275
switch (ke->type) {
270276
case KE_KEY:
277+
input_event(dev, EV_MSC, MSC_SCAN, ke->code);
271278
input_report_key(dev, ke->keycode, value);
272279
input_sync(dev);
273280
if (value && autorelease) {
@@ -305,12 +312,19 @@ bool sparse_keymap_report_event(struct input_dev *dev, unsigned int code,
305312
{
306313
const struct key_entry *ke =
307314
sparse_keymap_entry_from_scancode(dev, code);
315+
struct key_entry unknown_ke;
308316

309317
if (ke) {
310318
sparse_keymap_report_entry(dev, ke, value, autorelease);
311319
return true;
312320
}
313321

322+
/* Report an unknown key event as a debugging aid */
323+
unknown_ke.type = KE_KEY;
324+
unknown_ke.code = code;
325+
unknown_ke.keycode = KEY_UNKNOWN;
326+
sparse_keymap_report_entry(dev, &unknown_ke, value, true);
327+
314328
return false;
315329
}
316330
EXPORT_SYMBOL(sparse_keymap_report_event);

drivers/input/tablet/wacom_wac.c

Lines changed: 191 additions & 100 deletions
Large diffs are not rendered by default.

drivers/input/tablet/wacom_wac.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ struct wacom_features {
7474
int pressure_max;
7575
int distance_max;
7676
int type;
77+
int x_resolution;
78+
int y_resolution;
7779
int device_type;
7880
int x_phy;
7981
int y_phy;

drivers/input/touchscreen/h3600_ts_input.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ MODULE_LICENSE("GPL");
6262
Programmer has no control over these numbers.
6363
TODO there are holes - specifically 1,7,0x0a
6464
*/
65-
#define VERSION_ID 0 /* Get Version (request/respose) */
65+
#define VERSION_ID 0 /* Get Version (request/response) */
6666
#define KEYBD_ID 2 /* Keyboard (event) */
6767
#define TOUCHS_ID 3 /* Touch Screen (event)*/
6868
#define EEPROM_READ_ID 4 /* (request/response) */

0 commit comments

Comments
 (0)