patch-2.3.44 linux/drivers/usb/keybdev.c
Next file: linux/drivers/usb/printer.c
Previous file: linux/drivers/usb/input.c
Back to the patch index
Back to the overall index
- Lines: 18
- Date:
Thu Feb 10 17:07:26 2000
- Orig file:
v2.3.43/linux/drivers/usb/keybdev.c
- Orig date:
Thu Feb 10 17:11:15 2000
diff -u --recursive --new-file v2.3.43/linux/drivers/usb/keybdev.c linux/drivers/usb/keybdev.c
@@ -118,9 +118,16 @@
static int keybdev_connect(struct input_handler *handler, struct input_dev *dev)
{
struct input_handle *handle;
+ int i;
- if (!test_bit(EV_KEY, dev->evbit) || !test_bit(KEY_A, dev->keybit) || !test_bit(KEY_Z, dev->keybit))
+ if (!test_bit(EV_KEY, dev->evbit))
return -1;
+
+ for (i = KEY_RESERVED; i < BTN_MISC; i++)
+ if (test_bit(i, dev->keybit)) break;
+
+ if (i == BTN_MISC)
+ return -1;
if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
return -1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)