vserver 2.0 rc7
[linux-2.6.git] / drivers / usb / input / aiptek.c
index a2a037f..94ce2a9 100644 (file)
@@ -297,8 +297,6 @@ struct aiptek_features {
        int firmwareCode;       /* prom/eeprom version            */
        char usbPath[64 + 1];   /* device's physical usb path     */
        char inputPath[64 + 1]; /* input device path              */
-       char manuName[64 + 1];  /* manufacturer name              */
-       char prodName[64 + 1];  /* product name                   */
 };
 
 struct aiptek_settings {
@@ -388,7 +386,7 @@ static int aiptek_convert_from_2s_complement(unsigned char c)
  * convention above.) I therefore have taken over REL_MISC and ABS_MISC
  * (for relative and absolute reports, respectively) for communicating
  * Proximity. Why two events? I thought it interesting to know if the
- * Proximity event occured while the tablet was in absolute or relative
+ * Proximity event occurred while the tablet was in absolute or relative
  * mode.
  *
  * Other tablets use the notion of a certain minimum stylus pressure
@@ -796,7 +794,7 @@ exit:
  * manufacturing revisions. In any event, we consider these 
  * IDs to not be model-specific nor unique.
  */
-struct usb_device_id aiptek_ids[] = {
+static const struct usb_device_id aiptek_ids[] = {
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x01)},
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x10)},
        {USB_DEVICE(USB_VENDOR_ID_AIPTEK, 0x20)},
@@ -855,7 +853,7 @@ aiptek_set_report(struct aiptek *aiptek,
                               USB_REQ_SET_REPORT,
                               USB_TYPE_CLASS | USB_RECIP_INTERFACE |
                               USB_DIR_OUT, (report_type << 8) + report_id,
-                              aiptek->ifnum, buffer, size, 5 * HZ);
+                              aiptek->ifnum, buffer, size, 5000);
 }
 
 static int
@@ -868,7 +866,7 @@ aiptek_get_report(struct aiptek *aiptek,
                               USB_REQ_GET_REPORT,
                               USB_TYPE_CLASS | USB_RECIP_INTERFACE |
                               USB_DIR_IN, (report_type << 8) + report_id,
-                              aiptek->ifnum, buffer, size, 5 * HZ);
+                              aiptek->ifnum, buffer, size, 5000);
 }
 
 /***********************************************************************
@@ -1089,7 +1087,7 @@ static ssize_t show_tabletManufacturer(struct device *dev, char *buf)
        if (aiptek == NULL)
                return 0;
 
-       retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->features.manuName);
+       retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->usbdev->manufacturer);
        return retval;
 }
 
@@ -1106,7 +1104,7 @@ static ssize_t show_tabletProduct(struct device *dev, char *buf)
        if (aiptek == NULL)
                return 0;
 
-       retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->features.prodName);
+       retval = snprintf(buf, PAGE_SIZE, "%s\n", aiptek->usbdev->product);
        return retval;
 }
 
@@ -2140,6 +2138,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
        aiptek->inputdev.id.vendor = le16_to_cpu(usbdev->descriptor.idVendor);
        aiptek->inputdev.id.product = le16_to_cpu(usbdev->descriptor.idProduct);
        aiptek->inputdev.id.version = le16_to_cpu(usbdev->descriptor.bcdDevice);
+       aiptek->inputdev.dev = &intf->dev;
 
        aiptek->usbdev = usbdev;
        aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber;
@@ -2166,19 +2165,6 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id)
         */
        input_register_device(&aiptek->inputdev);
 
-       /* Go and decode the USB representation of the tablet's manufacturer
-        * name and product name. They only change once every hotplug event,
-        * which is why we put it here instead of in the sysfs interface.
-        */
-       usb_string(usbdev,
-                  usbdev->descriptor.iManufacturer,
-                  aiptek->features.manuName,
-                  sizeof(aiptek->features.manuName));
-       usb_string(usbdev,
-                  usbdev->descriptor.iProduct,
-                  aiptek->features.prodName,
-                  sizeof(aiptek->features.prodName));
-
        /* We now will look for the evdev device which is mapped to
         * the tablet. The partial name is kept in the link list of
         * input_handles associated with this input device.