Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
authorDmitry Torokhov <dtor@insightbb.com>
Tue, 19 Sep 2006 05:56:44 +0000 (01:56 -0400)
committerDmitry Torokhov <dtor@insightbb.com>
Tue, 19 Sep 2006 05:56:44 +0000 (01:56 -0400)
1  2 
drivers/char/keyboard.c
drivers/input/keyboard/atkbd.c
drivers/input/mouse/logips2pp.c
drivers/input/mouse/psmouse-base.c
drivers/usb/input/hid-core.c

diff --combined drivers/char/keyboard.c
index bf2339c869ea2fd7dcfcb9be79ba940a88e76cfe,3e90aac3751032b74178a85fd31f5778f3bb7d29..ca234ce8004ab040bf4f797cda3b9ae292c4ed7a
@@@ -1285,7 -1285,7 +1285,7 @@@ static void kbd_event(struct input_hand
   */
  static struct input_handle *kbd_connect(struct input_handler *handler,
                                        struct input_dev *dev,
 -                                      struct input_device_id *id)
 +                                      const struct input_device_id *id)
  {
        struct input_handle *handle;
        int i;
        if (i == BTN_MISC && !test_bit(EV_SND, dev->evbit))
                return NULL;
  
-       if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL)))
+       handle = kzalloc(sizeof(struct input_handle), GFP_KERNEL);
+       if (!handle)
                return NULL;
-       memset(handle, 0, sizeof(struct input_handle));
  
        handle->dev = dev;
        handle->handler = handler;
@@@ -1334,7 -1334,7 +1334,7 @@@ static void kbd_start(struct input_hand
        tasklet_enable(&keyboard_tasklet);
  }
  
 -static struct input_device_id kbd_ids[] = {
 +static const struct input_device_id kbd_ids[] = {
        {
                  .flags = INPUT_DEVICE_ID_MATCH_EVBIT,
                  .evbit = { BIT(EV_KEY) },
@@@ -1362,7 -1362,6 +1362,7 @@@ static struct input_handler kbd_handle
  int __init kbd_init(void)
  {
        int i;
 +      int error;
  
          for (i = 0; i < MAX_NR_CONSOLES; i++) {
                kbd_table[i].ledflagstate = KBD_DEFLEDS;
                kbd_table[i].kbdmode = VC_XLATE;
        }
  
 -      input_register_handler(&kbd_handler);
 +      error = input_register_handler(&kbd_handler);
 +      if (error)
 +              return error;
  
        tasklet_enable(&keyboard_tasklet);
        tasklet_schedule(&keyboard_tasklet);
index 9874072cf9d65cb60376f8a6473744bfee13201a,a86afd0a5ef13c95c869613c5fd4e67b7c414825..40244d4ce0f1696e6dc3179c7ab13e260884851a
@@@ -482,13 -482,7 +482,7 @@@ out
        return IRQ_HANDLED;
  }
  
- /*
-  * atkbd_event_work() is used to complete processing of events that
-  * can not be processed by input_event() which is often called from
-  * interrupt context.
-  */
- static void atkbd_event_work(void *data)
+ static int atkbd_set_repeat_rate(struct atkbd *atkbd)
  {
        const short period[32] =
                { 33,  37,  42,  46,  50,  54,  58,  63,  67,  75,  83,  92, 100, 109, 116, 125,
        const short delay[4] =
                { 250, 500, 750, 1000 };
  
-       struct atkbd *atkbd = data;
+       struct input_dev *dev = atkbd->dev;
+       unsigned char param;
+       int i = 0, j = 0;
+       while (i < ARRAY_SIZE(period) - 1 && period[i] < dev->rep[REP_PERIOD])
+               i++;
+       dev->rep[REP_PERIOD] = period[i];
+       while (j < ARRAY_SIZE(delay) - 1 && delay[j] < dev->rep[REP_DELAY])
+               j++;
+       dev->rep[REP_DELAY] = delay[j];
+       param = i | (j << 5);
+       return ps2_command(&atkbd->ps2dev, &param, ATKBD_CMD_SETREP);
+ }
+ static int atkbd_set_leds(struct atkbd *atkbd)
+ {
        struct input_dev *dev = atkbd->dev;
        unsigned char param[2];
-       int i, j;
  
-       mutex_lock(&atkbd->event_mutex);
+       param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
+                | (test_bit(LED_NUML,    dev->led) ? 2 : 0)
+                | (test_bit(LED_CAPSL,   dev->led) ? 4 : 0);
+       if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS))
+               return -1;
  
-       if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) {
-               param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
-                        | (test_bit(LED_NUML,    dev->led) ? 2 : 0)
-                        | (test_bit(LED_CAPSL,   dev->led) ? 4 : 0);
-               ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS);
-               if (atkbd->extra) {
-                       param[0] = 0;
-                       param[1] = (test_bit(LED_COMPOSE, dev->led) ? 0x01 : 0)
-                                | (test_bit(LED_SLEEP,   dev->led) ? 0x02 : 0)
-                                | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0)
-                                | (test_bit(LED_MISC,    dev->led) ? 0x10 : 0)
-                                | (test_bit(LED_MUTE,    dev->led) ? 0x20 : 0);
-                       ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_EX_SETLEDS);
-               }
+       if (atkbd->extra) {
+               param[0] = 0;
+               param[1] = (test_bit(LED_COMPOSE, dev->led) ? 0x01 : 0)
+                        | (test_bit(LED_SLEEP,   dev->led) ? 0x02 : 0)
+                        | (test_bit(LED_SUSPEND, dev->led) ? 0x04 : 0)
+                        | (test_bit(LED_MISC,    dev->led) ? 0x10 : 0)
+                        | (test_bit(LED_MUTE,    dev->led) ? 0x20 : 0);
+               if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_EX_SETLEDS))
+                       return -1;
        }
  
-       if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask)) {
-               i = j = 0;
-               while (i < 31 && period[i] < dev->rep[REP_PERIOD])
-                       i++;
-               while (j < 3 && delay[j] < dev->rep[REP_DELAY])
-                       j++;
-               dev->rep[REP_PERIOD] = period[i];
-               dev->rep[REP_DELAY] = delay[j];
-               param[0] = i | (j << 5);
-               ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP);
-       }
+       return 0;
+ }
+ /*
+  * atkbd_event_work() is used to complete processing of events that
+  * can not be processed by input_event() which is often called from
+  * interrupt context.
+  */
+ static void atkbd_event_work(void *data)
+ {
+       struct atkbd *atkbd = data;
+       mutex_lock(&atkbd->event_mutex);
+       if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask))
+               atkbd_set_leds(atkbd);
+       if (test_and_clear_bit(ATKBD_REP_EVENT_BIT, &atkbd->event_mask))
+               atkbd_set_repeat_rate(atkbd);
  
        mutex_unlock(&atkbd->event_mutex);
  }
@@@ -635,7 -652,9 +652,7 @@@ static int atkbd_probe(struct atkbd *at
                return 0;
        }
  
 -      if (param[0] != 0xab && param[0] != 0xac &&     /* Regular and NCD Sun keyboards */
 -          param[0] != 0x2b && param[0] != 0x5d &&     /* Trust keyboard, raw and translated */
 -          param[0] != 0x60 && param[0] != 0x47)       /* NMB SGI keyboard, raw and translated */
 +      if (!ps2_is_keyboard_id(param[0]))
                return -1;
  
        atkbd->id = (param[0] << 8) | param[1];
@@@ -973,7 -992,6 +990,6 @@@ static int atkbd_reconnect(struct seri
  {
        struct atkbd *atkbd = serio_get_drvdata(serio);
        struct serio_driver *drv = serio->drv;
-       unsigned char param[1];
  
        if (!atkbd || !drv) {
                printk(KERN_DEBUG "atkbd: reconnect request, but serio is disconnected, ignoring...\n");
        atkbd_disable(atkbd);
  
        if (atkbd->write) {
-               param[0] = (test_bit(LED_SCROLLL, atkbd->dev->led) ? 1 : 0)
-                        | (test_bit(LED_NUML,    atkbd->dev->led) ? 2 : 0)
-                        | (test_bit(LED_CAPSL,   atkbd->dev->led) ? 4 : 0);
                if (atkbd_probe(atkbd))
                        return -1;
                if (atkbd->set != atkbd_select_set(atkbd, atkbd->set, atkbd->extra))
  
                atkbd_activate(atkbd);
  
-               if (ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETLEDS))
-                       return -1;
+ /*
+  * Restore repeat rate and LEDs (that were reset by atkbd_activate)
+  * to pre-resume state
+  */
+               if (!atkbd->softrepeat)
+                       atkbd_set_repeat_rate(atkbd);
+               atkbd_set_leds(atkbd);
        }
  
        atkbd_enable(atkbd);
index eb03f3a3f8a77c2e28ef22c03f1da92405035c8e,54b696cfe1e33be4bf94b599ab8f5cc71e4562c7..7972eecbcfe4184863bdb84e0a3dda6eff31f854
@@@ -30,9 -30,9 +30,9 @@@
  #define PS2PP_NAV_BTN         0x20
  
  struct ps2pp_info {
 -      const int model;
 -      unsigned const int kind;
 -      unsigned const int features;
 +      u8 model;
 +      u8 kind;
 +      u16 features;
  };
  
  /*
@@@ -199,9 -199,9 +199,9 @@@ static void ps2pp_disconnect(struct psm
        device_remove_file(&psmouse->ps2dev.serio->dev, &psmouse_attr_smartscroll.dattr);
  }
  
 -static struct ps2pp_info *get_model_info(unsigned char model)
 +static const struct ps2pp_info *get_model_info(unsigned char model)
  {
 -      static struct ps2pp_info ps2pp_list[] = {
 +      static const struct ps2pp_info ps2pp_list[] = {
                { 12,   0,                      PS2PP_SIDE_BTN},
                { 13,   0,                      0 },
                { 15,   PS2PP_KIND_MX,                                  /* MX1000 */
                { 51,   0,                      0 },
                { 52,   PS2PP_KIND_WHEEL,       PS2PP_SIDE_BTN | PS2PP_WHEEL },
                { 53,   PS2PP_KIND_WHEEL,       PS2PP_WHEEL },
 +              { 56,   PS2PP_KIND_WHEEL,       PS2PP_SIDE_BTN | PS2PP_WHEEL }, /* Cordless MouseMan Wheel */
                { 61,   PS2PP_KIND_MX,                                  /* MX700 */
                                PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN |
                                PS2PP_EXTRA_BTN | PS2PP_NAV_BTN },
                { 100,  PS2PP_KIND_MX,                                  /* MX510 */
                                PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN |
                                PS2PP_EXTRA_BTN | PS2PP_NAV_BTN },
-               { 111,  PS2PP_KIND_MX,                                  /* MX300 */
-                               PS2PP_WHEEL | PS2PP_EXTRA_BTN | PS2PP_TASK_BTN },
+               { 111,  PS2PP_KIND_MX,  PS2PP_WHEEL | PS2PP_SIDE_BTN }, /* MX300 reports task button as side */
                { 112,  PS2PP_KIND_MX,                                  /* MX500 */
                                PS2PP_WHEEL | PS2PP_SIDE_BTN | PS2PP_TASK_BTN |
                                PS2PP_EXTRA_BTN | PS2PP_NAV_BTN },
                { 114,  PS2PP_KIND_MX,                                  /* MX310 */
                                PS2PP_WHEEL | PS2PP_SIDE_BTN |
 -                              PS2PP_TASK_BTN | PS2PP_EXTRA_BTN },
 -              { }
 +                              PS2PP_TASK_BTN | PS2PP_EXTRA_BTN }
        };
        int i;
  
 -      for (i = 0; ps2pp_list[i].model; i++)
 +      for (i = 0; i < ARRAY_SIZE(ps2pp_list); i++)
                if (model == ps2pp_list[i].model)
                        return &ps2pp_list[i];
  
   * Set up input device's properties based on the detected mouse model.
   */
  
 -static void ps2pp_set_model_properties(struct psmouse *psmouse, struct ps2pp_info *model_info,
 +static void ps2pp_set_model_properties(struct psmouse *psmouse,
 +                                     const struct ps2pp_info *model_info,
                                       int using_ps2pp)
  {
        struct input_dev *input_dev = psmouse->dev;
@@@ -329,7 -327,7 +328,7 @@@ int ps2pp_init(struct psmouse *psmouse
        struct ps2dev *ps2dev = &psmouse->ps2dev;
        unsigned char param[4];
        unsigned char model, buttons;
 -      struct ps2pp_info *model_info;
 +      const struct ps2pp_info *model_info;
        int use_ps2pp = 0;
  
        param[0] = 0;
  /*
   * Do Logitech PS2++ / PS2T++ magic init.
   */
 -              if (model == 97) { /* Touch Pad 3 */
 +              if (model_info->kind == PS2PP_KIND_TP3) { /* Touch Pad 3 */
  
                        /* Unprotect RAM */
                        param[0] = 0x11; param[1] = 0x04; param[2] = 0x68;
index ec0119459bc636ab5c8abb7cba28ac6618ef15a8,343afa38f4c2d2b1c38ae809097ea343d44a670a..9fb7eb6b0f71f3bb9f5d7972e99627146a463fa7
@@@ -112,8 -112,8 +112,8 @@@ static struct workqueue_struct *kpsmous
  
  struct psmouse_protocol {
        enum psmouse_type type;
 -      char *name;
 -      char *alias;
 +      const char *name;
 +      const char *alias;
        int maxproto;
        int (*detect)(struct psmouse *, int);
        int (*init)(struct psmouse *);
@@@ -485,13 -485,6 +485,6 @@@ static int im_explorer_detect(struct ps
        param[0] =  40;
        ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
  
-       param[0] = 200;
-       ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
-       param[0] = 200;
-       ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
-       param[0] =  60;
-       ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
        if (set_properties) {
                set_bit(BTN_MIDDLE, psmouse->dev->keybit);
                set_bit(REL_WHEEL, psmouse->dev->relbit);
@@@ -514,17 -507,15 +507,17 @@@ static int thinking_detect(struct psmou
  {
        struct ps2dev *ps2dev = &psmouse->ps2dev;
        unsigned char param[2];
 -      unsigned char seq[] = { 20, 60, 40, 20, 20, 60, 40, 20, 20, 0 };
 +      static const unsigned char seq[] = { 20, 60, 40, 20, 20, 60, 40, 20, 20 };
        int i;
  
        param[0] = 10;
        ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
        param[0] = 0;
        ps2_command(ps2dev, param, PSMOUSE_CMD_SETRES);
 -      for (i = 0; seq[i]; i++)
 -              ps2_command(ps2dev, seq + i, PSMOUSE_CMD_SETRATE);
 +      for (i = 0; i < ARRAY_SIZE(seq); i++) {
 +              param[0] = seq[i];
 +              ps2_command(ps2dev, param, PSMOUSE_CMD_SETRATE);
 +      }
        ps2_command(ps2dev, param, PSMOUSE_CMD_GETID);
  
        if (param[0] != 2)
@@@ -661,7 -652,7 +654,7 @@@ static int psmouse_extensions(struct ps
        return PSMOUSE_PS2;
  }
  
 -static struct psmouse_protocol psmouse_protocols[] = {
 +static const struct psmouse_protocol psmouse_protocols[] = {
        {
                .type           = PSMOUSE_PS2,
                .name           = "PS/2",
        },
  };
  
 -static struct psmouse_protocol *psmouse_protocol_by_type(enum psmouse_type type)
 +static const struct psmouse_protocol *psmouse_protocol_by_type(enum psmouse_type type)
  {
        int i;
  
        return &psmouse_protocols[0];
  }
  
 -static struct psmouse_protocol *psmouse_protocol_by_name(const char *name, size_t len)
 +static const struct psmouse_protocol *psmouse_protocol_by_name(const char *name, size_t len)
  {
 -      struct psmouse_protocol *p;
 +      const struct psmouse_protocol *p;
        int i;
  
        for (i = 0; i < ARRAY_SIZE(psmouse_protocols); i++) {
@@@ -804,15 -795,13 +797,15 @@@ static int psmouse_probe(struct psmous
  
  void psmouse_set_resolution(struct psmouse *psmouse, unsigned int resolution)
  {
 -      unsigned char params[] = { 0, 1, 2, 2, 3 };
 +      static const unsigned char params[] = { 0, 1, 2, 2, 3 };
 +      unsigned char p;
  
        if (resolution == 0 || resolution > 200)
                resolution = 200;
  
 -      ps2_command(&psmouse->ps2dev, &params[resolution / 50], PSMOUSE_CMD_SETRES);
 -      psmouse->resolution = 25 << params[resolution / 50];
 +      p = params[resolution / 50];
 +      ps2_command(&psmouse->ps2dev, &p, PSMOUSE_CMD_SETRES);
 +      psmouse->resolution = 25 << p;
  }
  
  /*
  
  static void psmouse_set_rate(struct psmouse *psmouse, unsigned int rate)
  {
 -      unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
 +      static const unsigned char rates[] = { 200, 100, 80, 60, 40, 20, 10, 0 };
 +      unsigned char r;
        int i = 0;
  
        while (rates[i] > rate) i++;
 -      ps2_command(&psmouse->ps2dev, &rates[i], PSMOUSE_CMD_SETRATE);
 -      psmouse->rate = rates[i];
 +      r = rates[i];
 +      ps2_command(&psmouse->ps2dev, &r, PSMOUSE_CMD_SETRATE);
 +      psmouse->rate = r;
  }
  
  /*
@@@ -1044,7 -1031,7 +1037,7 @@@ static void psmouse_disconnect(struct s
        mutex_unlock(&psmouse_mutex);
  }
  
 -static int psmouse_switch_protocol(struct psmouse *psmouse, struct psmouse_protocol *proto)
 +static int psmouse_switch_protocol(struct psmouse *psmouse, const struct psmouse_protocol *proto)
  {
        struct input_dev *input_dev = psmouse->dev;
  
@@@ -1375,7 -1362,7 +1368,7 @@@ static ssize_t psmouse_attr_set_protoco
        struct serio *serio = psmouse->ps2dev.serio;
        struct psmouse *parent = NULL;
        struct input_dev *new_dev;
 -      struct psmouse_protocol *proto;
 +      const struct psmouse_protocol *proto;
        int retry = 0;
  
        if (!(proto = psmouse_protocol_by_name(buf, count)))
@@@ -1472,7 -1459,7 +1465,7 @@@ static ssize_t psmouse_attr_set_resolut
  
  static int psmouse_set_maxproto(const char *val, struct kernel_param *kp)
  {
 -      struct psmouse_protocol *proto;
 +      const struct psmouse_protocol *proto;
  
        if (!val)
                return -EINVAL;
index e3cd0321c59c7185f5109386747b67215a71ac0a,a2c56b2de58984d901340ebc01bb639f25c9fc01..bfa267722f1bef96be8e780b5c0a4ae82bb35d98
@@@ -543,6 -543,8 +543,6 @@@ static void hid_free_device(struct hid_
  {
        unsigned i,j;
  
 -      hid_ff_exit(device);
 -
        for (i = 0; i < HID_REPORT_TYPES; i++) {
                struct hid_report_enum *report_enum = device->report_enum + i;
  
@@@ -1106,7 -1108,7 +1106,7 @@@ int hid_set_field(struct hid_field *fie
  /*
   * Find a report field with a specified HID usage.
   */
 -
 +#if 0
  struct hid_field *hid_find_field_by_usage(struct hid_device *hid, __u32 wanted_usage, int type)
  {
        struct hid_report *report;
                                return report->field[i];
        return NULL;
  }
 +#endif  /*  0  */
  
  static int hid_submit_out(struct hid_device *hid)
  {
@@@ -1410,17 -1411,54 +1410,54 @@@ void hid_init_reports(struct hid_devic
                warn("timeout initializing reports");
  }
  
+ #define USB_VENDOR_ID_GTCO            0x078c
+ #define USB_DEVICE_ID_GTCO_90         0x0090
+ #define USB_DEVICE_ID_GTCO_100                0x0100
+ #define USB_DEVICE_ID_GTCO_101                0x0101
+ #define USB_DEVICE_ID_GTCO_103                0x0103
+ #define USB_DEVICE_ID_GTCO_104                0x0104
+ #define USB_DEVICE_ID_GTCO_105                0x0105
+ #define USB_DEVICE_ID_GTCO_106                0x0106
+ #define USB_DEVICE_ID_GTCO_107                0x0107
+ #define USB_DEVICE_ID_GTCO_108                0x0108
+ #define USB_DEVICE_ID_GTCO_200                0x0200
+ #define USB_DEVICE_ID_GTCO_201                0x0201
+ #define USB_DEVICE_ID_GTCO_202                0x0202
+ #define USB_DEVICE_ID_GTCO_203                0x0203
+ #define USB_DEVICE_ID_GTCO_204                0x0204
+ #define USB_DEVICE_ID_GTCO_205                0x0205
+ #define USB_DEVICE_ID_GTCO_206                0x0206
+ #define USB_DEVICE_ID_GTCO_207                0x0207
+ #define USB_DEVICE_ID_GTCO_300                0x0300
+ #define USB_DEVICE_ID_GTCO_301                0x0301
+ #define USB_DEVICE_ID_GTCO_302                0x0302
+ #define USB_DEVICE_ID_GTCO_303                0x0303
+ #define USB_DEVICE_ID_GTCO_304                0x0304
+ #define USB_DEVICE_ID_GTCO_305                0x0305
+ #define USB_DEVICE_ID_GTCO_306                0x0306
+ #define USB_DEVICE_ID_GTCO_307                0x0307
+ #define USB_DEVICE_ID_GTCO_308                0x0308
+ #define USB_DEVICE_ID_GTCO_309                0x0309
+ #define USB_DEVICE_ID_GTCO_400                0x0400
+ #define USB_DEVICE_ID_GTCO_401                0x0401
+ #define USB_DEVICE_ID_GTCO_402                0x0402
+ #define USB_DEVICE_ID_GTCO_403                0x0403
+ #define USB_DEVICE_ID_GTCO_404                0x0404
+ #define USB_DEVICE_ID_GTCO_405                0x0405
+ #define USB_DEVICE_ID_GTCO_500                0x0500
+ #define USB_DEVICE_ID_GTCO_501                0x0501
+ #define USB_DEVICE_ID_GTCO_502                0x0502
+ #define USB_DEVICE_ID_GTCO_503                0x0503
+ #define USB_DEVICE_ID_GTCO_504                0x0504
+ #define USB_DEVICE_ID_GTCO_1000               0x1000
+ #define USB_DEVICE_ID_GTCO_1001               0x1001
+ #define USB_DEVICE_ID_GTCO_1002               0x1002
+ #define USB_DEVICE_ID_GTCO_1003               0x1003
+ #define USB_DEVICE_ID_GTCO_1004               0x1004
+ #define USB_DEVICE_ID_GTCO_1005               0x1005
+ #define USB_DEVICE_ID_GTCO_1006               0x1006
  #define USB_VENDOR_ID_WACOM           0x056a
- #define USB_DEVICE_ID_WACOM_PENPARTNER        0x0000
- #define USB_DEVICE_ID_WACOM_GRAPHIRE  0x0010
- #define USB_DEVICE_ID_WACOM_INTUOS    0x0020
- #define USB_DEVICE_ID_WACOM_PL                0x0030
- #define USB_DEVICE_ID_WACOM_INTUOS2   0x0040
- #define USB_DEVICE_ID_WACOM_VOLITO    0x0060
- #define USB_DEVICE_ID_WACOM_PTU               0x0003
- #define USB_DEVICE_ID_WACOM_INTUOS3   0x00B0
- #define USB_DEVICE_ID_WACOM_CINTIQ    0x003F
- #define USB_DEVICE_ID_WACOM_DTF         0x00C0
  
  #define USB_VENDOR_ID_ACECAD          0x0460
  #define USB_DEVICE_ID_ACECAD_FLAIR    0x0004
  #define USB_DEVICE_ID_4_PHIDGETSERVO_20       0x8104
  #define USB_DEVICE_ID_DUAL_USB_JOYPAD   0x8866
  
+ #define USB_VENDOR_ID_WISEGROUP_LTD   0x6677
+ #define USB_DEVICE_ID_SMARTJOY_DUAL_PLUS 0x8802
  #define USB_VENDOR_ID_CODEMERCS               0x07c0
  #define USB_DEVICE_ID_CODEMERCS_IOW40 0x1500
  #define USB_DEVICE_ID_CODEMERCS_IOW24 0x1501
@@@ -1584,6 -1625,51 +1624,51 @@@ static const struct hid_blacklist 
        { USB_VENDOR_ID_GLAB, USB_DEVICE_ID_0_8_8_IF_KIT, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_POWERMATE, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_GRIFFIN, USB_DEVICE_ID_SOUNDKNOB, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_90, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_100, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_101, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_103, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_104, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_105, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_106, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_107, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_108, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_200, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_201, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_202, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_203, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_204, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_205, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_206, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_207, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_300, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_301, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_302, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_303, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_304, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_305, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_306, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_307, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_308, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_309, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_400, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_401, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_402, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_403, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_404, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_405, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_500, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_501, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_502, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_503, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_504, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1000, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1001, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1002, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1003, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1004, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1005, HID_QUIRK_IGNORE },
+       { USB_VENDOR_ID_GTCO, USB_DEVICE_ID_GTCO_1006, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_KBGEAR, USB_DEVICE_ID_KBGEAR_JAMSTUDIO, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CASSY, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POCKETCASSY, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_GOTEMP, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_SKIP, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_VERNIER, USB_DEVICE_ID_VERNIER_CYCLOPS, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PENPARTNER, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 5, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 7, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 8, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PL + 9, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 5, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS2 + 7, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_VOLITO + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 5, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_GRAPHIRE + 6, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_PTU, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 1, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 2, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 3, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 4, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_INTUOS3 + 5, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_CINTIQ, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF, HID_QUIRK_IGNORE },
-       { USB_VENDOR_ID_WACOM, USB_DEVICE_ID_WACOM_DTF + 3, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_4_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_1_PHIDGETSERVO_20, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_YEALINK, USB_DEVICE_ID_YEALINK_P1K_P4K_B2K, HID_QUIRK_IGNORE },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVM, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_ATEN, USB_DEVICE_ID_ATEN_4PORTKVMC, HID_QUIRK_NOGET },
        { USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
+       { USB_VENDOR_ID_WISEGROUP_LTD, USB_DEVICE_ID_SMARTJOY_DUAL_PLUS, HID_QUIRK_NOGET | HID_QUIRK_MULTI_INPUT },
  
        { USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_MIGHTYMOUSE, HID_QUIRK_MIGHTYMOUSE | HID_QUIRK_INVERT_HWHEEL },
        { USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU, HID_QUIRK_2WHEEL_MOUSE_HACK_7 },
@@@ -1773,6 -1817,10 +1816,10 @@@ static struct hid_device *usb_hid_confi
        char *rdesc;
        int n, len, insize = 0;
  
+         /* Ignore all Wacom devices */
+         if (dev->descriptor.idVendor == USB_VENDOR_ID_WACOM)
+                 return NULL;
        for (n = 0; hid_blacklist[n].idVendor; n++)
                if ((hid_blacklist[n].idVendor == le16_to_cpu(dev->descriptor.idVendor)) &&
                        (hid_blacklist[n].idProduct == le16_to_cpu(dev->descriptor.idProduct)))