]> Git Repo - linux.git/commitdiff
Merge tag 'staging-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
authorLinus Torvalds <[email protected]>
Mon, 1 Oct 2012 19:11:39 +0000 (12:11 -0700)
committerLinus Torvalds <[email protected]>
Mon, 1 Oct 2012 19:11:39 +0000 (12:11 -0700)
Pull staging tree update from Greg Kroah-Hartman:
 "Here is the big staging tree update for the 3.7-rc1 merge window.

  There are a few patches in here that are outside of the staging area,
  namely HID and IIO patches, but all of them have been acked by the
  relevant subsystem maintainers.  The IIO stuff is still coming in
  through this tree as it hasn't entirely moved out of the staging tree,
  but is almost there.

  Other than that, there wa a ton of work on the comedi drivers to make
  them more readable and the correct style.  Doing that removed a lot of
  code, but we added a new driver to the staging tree, so we didn't end
  up with a net reduction this time around:

   662 files changed, 51649 insertions(+), 26582 deletions(-)

  All of these patches have been in the linux-next tree already.

Signed-off-by: Greg Kroah-Hartman <[email protected]>"
* tag 'staging-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1094 commits)
  staging: comedi: jr3_pci: fix iomem dereference
  staging: comedi: drivers: use comedi_fc.h cmdtest helpers
  Staging: winbond: usb_free_urb(NULL) is safe
  Staging: winbond: checkpatch cleanup
  Staging: winbond: Removed undesired spaces, lines and tabs
  Staging: winbond: Typo corrections in comments
  Staging: winbond: Changed c99 comments to c89 comments
  staging: r8712u: Do not queue cloned skb
  staging: comedi: ni_mio_common: always lock in ni_ai_poll()
  staging: comedi: s626: add FIXME comment
  staging: comedi: s626: don't dereference insn->data
  staging: comedi: s526: fix if() check in s526_gpct_winsn()
  staging: comedi: s626: cleanup comments in s626_initialize()
  staging: comedi: s626: remove clear of kzalloc'ed data
  staging: comedi: s626: remove 'WDInterval' from private data
  staging: comedi: s626: remove 'ChargeEnabled' from private data
  staging: comedi: s626: remove 'IsBoardRevA' comment
  staging: comedi: s626: #if 0 out the "SAA7146 BUG WORKAROUND"
  staging: comedi: s626: remove 'allocatedBuf' from private data
  staging: comedi: s626: add final attach message
  ...

1  2 
drivers/hid/Kconfig
drivers/hid/Makefile
drivers/hid/hid-core.c
drivers/hid/hid-ids.h
drivers/staging/et131x/et131x.c

diff --combined drivers/hid/Kconfig
index 2af774ad10606b7048e70ec7218ce36f33010c77,f8d314060853c815625b85d19353f10eae745f05..1630150ad2b19e1cf362881ff91e850c044e72d5
@@@ -307,6 -307,7 +307,6 @@@ config HID_LOGITEC
  config HID_LOGITECH_DJ
        tristate "Logitech Unifying receivers full support"
        depends on HID_LOGITECH
 -      default m
        ---help---
        Say Y if you want support for Logitech Unifying receivers and devices.
        Unifying receivers are capable of pairing up to 6 Logitech compliant
@@@ -526,14 -527,6 +526,14 @@@ config HID_PICOLCD_LED
        ---help---
          Provide access to PicoLCD's GPO pins via leds class.
  
 +config HID_PICOLCD_CIR
 +      bool "CIR via RC class" if EXPERT
 +      default !EXPERT
 +      depends on HID_PICOLCD
 +      depends on HID_PICOLCD=RC_CORE || RC_CORE=y
 +      ---help---
 +        Provide access to PicoLCD's CIR interface via remote control (LIRC).
 +
  config HID_PRIMAX
        tristate "Primax non-fully HID-compliant devices"
        depends on USB_HID
        Support for Primax devices that are not fully compliant with the
        HID standard.
  
 +config HID_PS3REMOTE
 +      tristate "Sony PS3 BD Remote Control"
 +      depends on BT_HIDP
 +      ---help---
 +      Support for the Sony PS3 Blue-ray Disk Remote Control and Logitech
 +      Harmony Adapter for PS3, which connect over Bluetooth.
 +
 +      Support for the 6-axis controllers is provided by HID_SONY.
 +
  config HID_ROCCAT
        tristate "Roccat device support"
        depends on USB_HID
@@@ -577,9 -561,7 +577,9 @@@ config HID_SON
        tristate "Sony PS3 controller"
        depends on USB_HID
        ---help---
 -      Support for Sony PS3 controller.
 +      Support for Sony PS3 6-axis controllers.
 +
 +      Support for the Sony PS3 BD Remote is provided by HID_PS3REMOTE.
  
  config HID_SPEEDLINK
        tristate "Speedlink VAD Cezanne mouse support"
@@@ -708,6 -690,20 +708,20 @@@ config HID_ZYDACRO
        ---help---
        Support for Zydacron remote control.
  
+ config HID_SENSOR_HUB
+       tristate "HID Sensors framework support"
+       depends on USB_HID
+       select MFD_CORE
+       default n
+       -- help---
+         Support for HID Sensor framework. This creates a MFD instance
+         for a sensor hub and identifies all the sensors connected to it.
+         Each sensor is registered as a MFD cell, so that sensor specific
+         processing can be done in a separate driver. Each sensor
+         drivers can use the service provided by this driver to register
+         for events and handle data streams. Each sensor driver can format
+         data and present to user mode using input or IIO interface.
  endmenu
  
  endif # HID
diff --combined drivers/hid/Makefile
index 5a3690ff9bf2d579c8993ec23aa4b7bef6a95341,1173d7af20e8327850934a7f1f6a5f9b8a14e1aa..cef68ca859d335e7a58853a7fd55dc898b9c825e
@@@ -69,28 -69,7 +69,28 @@@ obj-$(CONFIG_HID_PRODIKEYS) += hid-prod
  obj-$(CONFIG_HID_PANTHERLORD) += hid-pl.o
  obj-$(CONFIG_HID_PETALYNX)    += hid-petalynx.o
  obj-$(CONFIG_HID_PICOLCD)     += hid-picolcd.o
 +hid-picolcd-y                 += hid-picolcd_core.o
 +ifdef CONFIG_HID_PICOLCD_FB
 +hid-picolcd-y                 += hid-picolcd_fb.o
 +endif
 +ifdef CONFIG_HID_PICOLCD_BACKLIGHT
 +hid-picolcd-y                 += hid-picolcd_backlight.o
 +endif
 +ifdef CONFIG_HID_PICOLCD_LCD
 +hid-picolcd-y                 += hid-picolcd_lcd.o
 +endif
 +ifdef CONFIG_HID_PICOLCD_LEDS
 +hid-picolcd-y                 += hid-picolcd_leds.o
 +endif
 +ifdef CONFIG_HID_PICOLCD_CIR
 +hid-picolcd-y                 += hid-picolcd_cir.o
 +endif
 +ifdef CONFIG_DEBUG_FS
 +hid-picolcd-y                 += hid-picolcd_debugfs.o
 +endif
 +
  obj-$(CONFIG_HID_PRIMAX)      += hid-primax.o
 +obj-$(CONFIG_HID_PS3REMOTE)   += hid-ps3remote.o
  obj-$(CONFIG_HID_ROCCAT)      += hid-roccat.o hid-roccat-common.o \
        hid-roccat-arvo.o hid-roccat-isku.o hid-roccat-kone.o \
        hid-roccat-koneplus.o hid-roccat-kovaplus.o hid-roccat-pyra.o \
@@@ -112,6 -91,7 +112,7 @@@ obj-$(CONFIG_HID_ZYDACRON)  += hid-zydac
  obj-$(CONFIG_HID_WACOM)               += hid-wacom.o
  obj-$(CONFIG_HID_WALTOP)      += hid-waltop.o
  obj-$(CONFIG_HID_WIIMOTE)     += hid-wiimote.o
+ obj-$(CONFIG_HID_SENSOR_HUB)  += hid-sensor-hub.o
  
  obj-$(CONFIG_USB_HID)         += usbhid/
  obj-$(CONFIG_USB_MOUSE)               += usbhid/
diff --combined drivers/hid/hid-core.c
index 2cd6880b6b173d79ab244335f52d9f1324513e54,9b1dff1ddc1bfcdc352ee91730a3d4bcb8b27b6c..bd3971bf31bf7bc4369911a648b02c8729a3004d
@@@ -126,7 -126,7 +126,7 @@@ static int open_collection(struct hid_p
  
        if (parser->collection_stack_ptr == HID_COLLECTION_STACK_SIZE) {
                hid_err(parser->device, "collection stack overflow\n");
 -              return -1;
 +              return -EINVAL;
        }
  
        if (parser->device->maxcollection == parser->device->collection_size) {
                                parser->device->collection_size * 2, GFP_KERNEL);
                if (collection == NULL) {
                        hid_err(parser->device, "failed to reallocate collection array\n");
 -                      return -1;
 +                      return -ENOMEM;
                }
                memcpy(collection, parser->device->collection,
                        sizeof(struct hid_collection) *
@@@ -170,7 -170,7 +170,7 @@@ static int close_collection(struct hid_
  {
        if (!parser->collection_stack_ptr) {
                hid_err(parser->device, "collection stack underflow\n");
 -              return -1;
 +              return -EINVAL;
        }
        parser->collection_stack_ptr--;
        return 0;
@@@ -374,7 -374,7 +374,7 @@@ static int hid_parser_global(struct hid
  
        case HID_GLOBAL_ITEM_TAG_REPORT_SIZE:
                parser->global.report_size = item_udata(item);
 -              if (parser->global.report_size > 96) {
 +              if (parser->global.report_size > 128) {
                        hid_err(parser->device, "invalid report_size %d\n",
                                        parser->global.report_size);
                        return -1;
@@@ -757,7 -757,6 +757,7 @@@ int hid_open_report(struct hid_device *
        struct hid_item item;
        unsigned int size;
        __u8 *start;
 +      __u8 *buf;
        __u8 *end;
        int ret;
        static int (*dispatch_type[])(struct hid_parser *parser,
                return -ENODEV;
        size = device->dev_rsize;
  
 +      buf = kmemdup(start, size, GFP_KERNEL);
 +      if (buf == NULL)
 +              return -ENOMEM;
 +
        if (device->driver->report_fixup)
 -              start = device->driver->report_fixup(device, start, &size);
 +              start = device->driver->report_fixup(device, buf, &size);
 +      else
 +              start = buf;
  
 -      device->rdesc = kmemdup(start, size, GFP_KERNEL);
 -      if (device->rdesc == NULL)
 +      start = kmemdup(start, size, GFP_KERNEL);
 +      kfree(buf);
 +      if (start == NULL)
                return -ENOMEM;
 +
 +      device->rdesc = start;
        device->rsize = size;
  
        parser = vzalloc(sizeof(struct hid_parser));
@@@ -1458,14 -1448,7 +1458,14 @@@ void hid_disconnect(struct hid_device *
  }
  EXPORT_SYMBOL_GPL(hid_disconnect);
  
 -/* a list of devices for which there is a specialized driver on HID bus */
 +/*
 + * A list of devices for which there is a specialized driver on HID bus.
 + *
 + * Please note that for multitouch devices (driven by hid-multitouch driver),
 + * there is a proper autodetection and autoloading in place (based on presence
 + * of HID_DG_CONTACTID), so those devices don't need to be added to this list,
 + * as we are doing the right thing in hid_scan_usage().
 + */
  static const struct hid_device_id hid_have_special_driver[] = {
        { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_WCP32PU) },
        { HID_USB_DEVICE(USB_VENDOR_ID_A4TECH, USB_DEVICE_ID_A4TECH_X5_005D) },
        { HID_USB_DEVICE(USB_VENDOR_ID_GYRATION, USB_DEVICE_ID_GYRATION_REMOTE_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK, USB_DEVICE_ID_HOLTEK_ON_LINE_GRIP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_HOLTEK_ALT, USB_DEVICE_ID_HOLTEK_ALT_KEYBOARD) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_INTEL_8086, USB_DEVICE_ID_SENSOR_HUB_1020) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_INTEL_8086, USB_DEVICE_ID_SENSOR_HUB_09FA) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_INTEL_8087, USB_DEVICE_ID_SENSOR_HUB_1020) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_INTEL_8087, USB_DEVICE_ID_SENSOR_HUB_09FA) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KENSINGTON, USB_DEVICE_ID_KS_SLIMBLADE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KEYTOUCH, USB_DEVICE_ID_KEYTOUCH_IEC) },
        { HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_S510_RECEIVER_2) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RECEIVER) },
 +      { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_DESKTOP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_EDGE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_DINOVO_MINI) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ORTEK, USB_DEVICE_ID_ORTEK_WKB2000) },
        { HID_USB_DEVICE(USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_PRIMAX, USB_DEVICE_ID_PRIMAX_KEYBOARD) },
 +#if IS_ENABLED(CONFIG_HID_ROCCAT)
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_KONE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ARVO) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_ISKU) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRED) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_PYRA_WIRELESS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_ROCCAT, USB_DEVICE_ID_ROCCAT_SAVU) },
 +#endif
        { HID_USB_DEVICE(USB_VENDOR_ID_SAITEK, USB_DEVICE_ID_SAITEK_PS1000) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_IR_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SAMSUNG, USB_DEVICE_ID_SAMSUNG_WIRELESS_KBD_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SKYCABLE, USB_DEVICE_ID_SKYCABLE_WIRELESS_PRESENTER) },
 +      { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_BDREMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_STANTUM_STM, USB_DEVICE_ID_SENSOR_HUB_7014) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb300) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb304) },
        { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb323) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_WP1062) },
        { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_UCLOGIC, USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SMARTJOY_PLUS) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_SUPER_JOY_BOX_3) },
        { HID_USB_DEVICE(USB_VENDOR_ID_WISEGROUP, USB_DEVICE_ID_DUAL_USB_JOYPAD) },
diff --combined drivers/hid/hid-ids.h
index ca4d83e6e3872b1f84bf86ec496fa81ad4f7a2a6,8a270a38cfa174b59239b38337f8fe56cb062631..269b50912a4ae9207d1d04f2e014b3c950f20324
@@@ -5,6 -5,7 +5,6 @@@
   *  Copyright (c) 2000-2005 Vojtech Pavlik <[email protected]>
   *  Copyright (c) 2005 Michael Haboustak <[email protected]> for Concept2, Inc
   *  Copyright (c) 2006-2007 Jiri Kosina
 - *  Copyright (c) 2007 Paul Walmsley
   */
  
  /*
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72FA     0x72fa
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7302     0x7302
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7349     0x7349
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_73F7     0x73f7
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001     0xa001
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_7224      0x7224
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72D0      0x72d0
 +#define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_72C4      0x72c4
  
  #define USB_VENDOR_ID_ELECOM          0x056e
  #define USB_DEVICE_ID_ELECOM_BM084    0x0061
  #define USB_VENDOR_ID_EMS             0x2006
  #define USB_DEVICE_ID_EMS_TRIO_LINKER_PLUS_II 0x0118
  
 +#define USB_VENDOR_ID_FLATFROG                0x25b5
 +#define USB_DEVICE_ID_MULTITOUCH_3200 0x0002
 +
  #define USB_VENDOR_ID_ESSENTIAL_REALITY       0x0d7f
  #define USB_DEVICE_ID_ESSENTIAL_REALITY_P5 0x0100
  
  #define USB_VENDOR_ID_EZKEY           0x0518
  #define USB_DEVICE_ID_BTC_8193                0x0002
  
 +#define USB_VENDOR_ID_FREESCALE               0x15A2
 +#define USB_DEVICE_ID_FREESCALE_MX28  0x004F
 +
  #define USB_VENDOR_ID_FRUCTEL 0x25B6
  #define USB_DEVICE_ID_GAMETEL_MT_MODE 0x0002
  
  
  #define USB_VENDOR_ID_GENERAL_TOUCH   0x0dfc
  #define USB_DEVICE_ID_GENERAL_TOUCH_WIN7_TWOFINGERS 0x0003
 +#define USB_DEVICE_ID_GENERAL_TOUCH_WIN8_PWT_TENFINGERS 0x0100
  
  #define USB_VENDOR_ID_GLAB            0x06c2
  #define USB_DEVICE_ID_4_PHIDGETSERVO_30       0x0038
  #define USB_VENDOR_ID_IMATION         0x0718
  #define USB_DEVICE_ID_DISC_STAKKA     0xd000
  
+ #define USB_VENDOR_ID_INTEL_8086      0x8086
+ #define USB_VENDOR_ID_INTEL_8087      0x8087
+ #define USB_DEVICE_ID_SENSOR_HUB_1020 0x1020
+ #define USB_DEVICE_ID_SENSOR_HUB_09FA 0x09FA
  #define USB_VENDOR_ID_IRTOUCHSYSTEMS  0x6615
  #define USB_DEVICE_ID_IRTOUCH_INFRARED_USB    0x0070
  
  #define USB_DEVICE_ID_LOGITECH_RECEIVER       0xc101
  #define USB_DEVICE_ID_LOGITECH_HARMONY_FIRST  0xc110
  #define USB_DEVICE_ID_LOGITECH_HARMONY_LAST 0xc14f
 +#define USB_DEVICE_ID_LOGITECH_HARMONY_PS3 0x0306
  #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD_CORD 0xc20a
  #define USB_DEVICE_ID_LOGITECH_RUMBLEPAD      0xc211
  #define USB_DEVICE_ID_LOGITECH_EXTREME_3D     0xc215
  #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH            0x3000
  #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3001               0x3001
  #define USB_DEVICE_ID_QUANTA_OPTICAL_TOUCH_3008               0x3008
 -#define USB_DEVICE_ID_PIXART_IMAGING_INC_OPTICAL_TOUCH_SCREEN 0x3001
  
  #define USB_VENDOR_ID_ROCCAT          0x1e7d
  #define USB_DEVICE_ID_ROCCAT_ARVO     0x30d4
  
  #define USB_VENDOR_ID_SONY                    0x054c
  #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE     0x024b
 +#define USB_DEVICE_ID_SONY_PS3_BDREMOTE               0x0306
  #define USB_DEVICE_ID_SONY_PS3_CONTROLLER     0x0268
  #define USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER      0x042f
  
  
  #define USB_VENDOR_ID_STANTUM_STM             0x0483
  #define USB_DEVICE_ID_MTP_STM         0x3261
+ #define USB_DEVICE_ID_SENSOR_HUB_7014 0x7014
  
  #define USB_VENDOR_ID_STANTUM_SITRONIX                0x1403
  #define USB_DEVICE_ID_MTP_SITRONIX            0x5001
  #define USB_DEVICE_ID_UCLOGIC_TABLET_WP8060U  0x0005
  #define USB_DEVICE_ID_UCLOGIC_TABLET_WP1062   0x0064
  #define USB_DEVICE_ID_UCLOGIC_WIRELESS_TABLET_TWHL850 0x0522
 +#define USB_DEVICE_ID_UCLOGIC_TABLET_TWHA60   0x0781
  
  #define USB_VENDOR_ID_UNITEC  0x227d
  #define USB_DEVICE_ID_UNITEC_USB_TOUCH_0709   0x0709
index 49553f88c7b3ef35de1a8f55a09a7f7da7e349eb,c13499d93db11d1f67244d27230679e3633252b7..413da0d6b9f6821fc74a1ef1782812b75559b8d1
@@@ -3955,12 -3955,7 +3955,7 @@@ static void et131x_hwaddr_init(struct e
         * EEPROM then we need to generate the last octet and set it on the
         * device
         */
-       if (adapter->rom_addr[0] == 0x00 &&
-           adapter->rom_addr[1] == 0x00 &&
-           adapter->rom_addr[2] == 0x00 &&
-           adapter->rom_addr[3] == 0x00 &&
-           adapter->rom_addr[4] == 0x00 &&
-           adapter->rom_addr[5] == 0x00) {
+       if (is_zero_ether_addr(adapter->rom_addr)) {
                /*
                 * We need to randomly generate the last octet so we
                 * decrease our chances of setting the mac address to
  static int et131x_pci_init(struct et131x_adapter *adapter,
                                                struct pci_dev *pdev)
  {
 -      int cap = pci_pcie_cap(pdev);
        u16 max_payload;
 -      u16 ctl;
        int i, rc;
  
        rc = et131x_init_eeprom(adapter);
        if (rc < 0)
                goto out;
  
 -      if (!cap) {
 +      if (!pci_is_pcie(pdev)) {
                dev_err(&pdev->dev, "Missing PCIe capabilities\n");
                goto err_out;
        }
        /* Let's set up the PORT LOGIC Register.  First we need to know what
         * the max_payload_size is
         */
 -      if (pci_read_config_word(pdev, cap + PCI_EXP_DEVCAP, &max_payload)) {
 +      if (pcie_capability_read_word(pdev, PCI_EXP_DEVCAP, &max_payload)) {
                dev_err(&pdev->dev,
                    "Could not read PCI config space for Max Payload Size\n");
                goto err_out;
        }
  
        /* Change the max read size to 2k */
 -      if (pci_read_config_word(pdev, cap + PCI_EXP_DEVCTL, &ctl)) {
 +      if (pcie_capability_clear_and_set_word(pdev, PCI_EXP_DEVCTL,
 +                              PCI_EXP_DEVCTL_READRQ, 0x4 << 12)) {
                dev_err(&pdev->dev,
 -                      "Could not read PCI config space for Max read size\n");
 -              goto err_out;
 -      }
 -
 -      ctl = (ctl & ~PCI_EXP_DEVCTL_READRQ) | (0x04 << 12);
 -
 -      if (pci_write_config_word(pdev, cap + PCI_EXP_DEVCTL, ctl)) {
 -              dev_err(&pdev->dev,
 -                    "Could not write PCI config space for Max read size\n");
 +                      "Couldn't change PCI config space for Max read size\n");
                goto err_out;
        }
  
This page took 0.092672 seconds and 4 git commands to generate.