]> err.no Git - linux-2.6/blobdiff - drivers/input/tablet/aiptek.c
Merge branch 'for-2.6.26' of master.kernel.org:/pub/scm/linux/kernel/git/jwboyer...
[linux-2.6] / drivers / input / tablet / aiptek.c
index 94683f58c9e18ec5b933d7721ab3b07467ae9a1c..55c1134d61372aaf2889bb93f6cc33aef8b656ee 100644 (file)
  */
 
 #define USB_VENDOR_ID_AIPTEK                           0x08ca
+#define USB_VENDOR_ID_KYE                              0x0458
 #define USB_REQ_GET_REPORT                             0x01
 #define USB_REQ_SET_REPORT                             0x09
 
@@ -527,9 +528,9 @@ static void aiptek_irq(struct urb *urb)
                            (aiptek->curSetting.pointerMode)) {
                                aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
                } else {
-                       x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
-                       y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
-                       z = le16_to_cpu(get_unaligned((__le16 *) (data + 6)));
+                       x = get_unaligned_le16(data + 1);
+                       y = get_unaligned_le16(data + 3);
+                       z = get_unaligned_le16(data + 6);
 
                        dv = (data[5] & 0x01) != 0 ? 1 : 0;
                        p = (data[5] & 0x02) != 0 ? 1 : 0;
@@ -612,8 +613,8 @@ static void aiptek_irq(struct urb *urb)
                        (aiptek->curSetting.pointerMode)) {
                        aiptek->diagnostic = AIPTEK_DIAGNOSTIC_TOOL_DISALLOWED;
                } else {
-                       x = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
-                       y = le16_to_cpu(get_unaligned((__le16 *) (data + 3)));
+                       x = get_unaligned_le16(data + 1);
+                       y = get_unaligned_le16(data + 3);
 
                        jitterable = data[5] & 0x1c;
 
@@ -678,7 +679,7 @@ static void aiptek_irq(struct urb *urb)
                pck = (data[1] & aiptek->curSetting.stylusButtonUpper) != 0 ? 1 : 0;
 
                macro = dv && p && tip && !(data[3] & 1) ? (data[3] >> 1) : -1;
-               z = le16_to_cpu(get_unaligned((__le16 *) (data + 4)));
+               z = get_unaligned_le16(data + 4);
 
                if (dv) {
                        /* If the selected tool changed, reset the old
@@ -756,7 +757,7 @@ static void aiptek_irq(struct urb *urb)
         * hat switches (which just so happen to be the macroKeys.)
         */
        else if (data[0] == 6) {
-               macro = le16_to_cpu(get_unaligned((__le16 *) (data + 1)));
+               macro = get_unaligned_le16(data + 1);
                if (macro > 0) {
                        input_report_key(inputdev, macroKeyEvents[macro - 1],
                                         0);
@@ -832,6 +833,7 @@ static const struct usb_device_id aiptek_ids[] = {
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x22)},
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x23)},
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x24)},
+       {USB_DEVICE(USB_VENDOR_ID_KYE, 0x5003)},
        {}
 };
 
@@ -950,7 +952,7 @@ aiptek_query(struct aiptek *aiptek, unsigned char command, unsigned char data)
                    buf[0], buf[1], buf[2]);
                ret = -EIO;
        } else {
-               ret = le16_to_cpu(get_unaligned((__le16 *) (buf + 1)));
+               ret = get_unaligned_le16(buf + 1);
        }
        kfree(buf);
        return ret;