Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Apr 2018 18:53:34 +0000 (11:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 5 Apr 2018 18:53:34 +0000 (11:53 -0700)
Pull HID updates from Jiri Kosina:

 - 3rd generation Wacom Intuos BT device support from Aaron Armstrong
   Skomra

 - support for NSG-MR5U and NSG-MR7U devices from Todd Kelner

 - multitouch Razer Blade Stealth support from Benjamin Tissoires

 - Elantech touchpad support from Alexandrov Stansilav

 - a few other scattered-around fixes and cleanups to drivers and
   generic code

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid: (31 commits)
  HID: google: Enable PM Full On mode when adjusting backlight
  HID: google: add google hammer HID driver
  HID: core: reset the quirks before calling probe again
  HID: multitouch: do not set HID_QUIRK_NO_INIT_REPORTS
  HID: core: remove the need for HID_QUIRK_NO_EMPTY_INPUT
  HID: use BIT() macro for quirks too
  HID: use BIT macro instead of plain integers for flags
  HID: multitouch: remove dead zones of Razer Blade Stealth
  HID: multitouch: export a quirk for the button handling of touchpads
  HID: usbhid: extend the polling interval configuration to keyboards
  HID: ntrig: document sysfs interface
  HID: wacom: wacom_wac_collection() is local to wacom_wac.c
  HID: wacom: generic: add the "Report Valid" usage
  HID: wacom: generic: Support multiple tools per report
  HID: wacom: Add support for 3rd generation Intuos BT
  HID: core: rewrite the hid-generic automatic unbind
  HID: sony: Add touchpad support for NSG-MR5U and NSG-MR7U remotes
  HID: hid-multitouch: Use true and false for boolean values
  HID: hid-ntrig: use true and false for boolean values
  HID: logitech-hidpp: document sysfs interface
  ...

1  2 
Documentation/admin-guide/kernel-parameters.txt
drivers/hid/hid-ids.h
drivers/hid/hid-quirks.c
drivers/hid/uhid.c

index 5ffe4c4121bda1f2b33ae94bf2af71cfe02e1c4d,e0d82520668103d863b2a417caeb67897b4734f7..34dac7cef4cfbfd8b4c59d4996b81f14a4c45f87
                        console=brl,ttyS0
                For now, only VisioBraille is supported.
  
 +      console_msg_format=
 +                      [KNL] Change console messages format
 +              default
 +                      By default we print messages on consoles in
 +                      "[time stamp] text\n" format (time stamp may not be
 +                      printed, depending on CONFIG_PRINTK_TIME or
 +                      `printk_time' param).
 +              syslog
 +                      Switch to syslog format: "<%u>[time stamp] text\n"
 +                      IOW, each message will have a facility and loglevel
 +                      prefix. The format is similar to one used by syslog()
 +                      syscall, or to executing "dmesg -S --raw" or to reading
 +                      from /proc/kmsg.
 +
        consoleblank=   [KNL] The console blank (screen saver) timeout in
                        seconds. A value of 0 disables the blank timer.
                         Defaults to 0.
  
        earlycon=       [KNL] Output early console device and options.
  
 -                      When used with no options, the early console is
 -                      determined by the stdout-path property in device
 -                      tree's chosen node.
 +                      [ARM64] The early console is determined by the
 +                      stdout-path property in device tree's chosen node,
 +                      or determined by the ACPI SPCR table.
 +
 +                      [X86] When used with no options the early console is
 +                      determined by the ACPI SPCR table.
  
                cdns,<addr>[,options]
                        Start an early, polled-mode console on a Cadence
                        address. The serial port must already be setup
                        and configured. Options are not yet supported.
  
 -      earlyprintk=    [X86,SH,BLACKFIN,ARM,M68k,S390]
 +      earlyprintk=    [X86,SH,ARM,M68k,S390]
                        earlyprintk=vga
                        earlyprintk=efi
                        earlyprintk=sclp
                               If specified, z/VM IUCV HVC accepts connections
                               from listed z/VM user IDs only.
  
 -      hwthread_map=   [METAG] Comma-separated list of Linux cpu id to
 -                              hardware thread id mappings.
 -                              Format: <cpu>:<hwthread>
 -
        keep_bootcon    [KNL]
                        Do not unregister boot console at start. This is only
                        useful for debugging when something happens in the window
                        of a GICv2 controller even if the memory range
                        exposed by the device tree is too small.
  
 +      irqchip.gicv3_nolpi=
 +                      [ARM, ARM64]
 +                      Force the kernel to ignore the availability of
 +                      LPIs (and by consequence ITSs). Intended for system
 +                      that use the kernel as a bootloader, and thus want
 +                      to let secondary kernels in charge of setting up
 +                      LPIs.
 +
        irqfixup        [HW]
                        When an interrupt is not handled search all handlers
                        for it. Intended to get systems with badly broken
  
                        nohz
                          Disable the tick when a single task runs.
 +
 +                        A residual 1Hz tick is offloaded to workqueues, which you
 +                        need to affine to housekeeping through the global
 +                        workqueue's affinity configured via the
 +                        /sys/devices/virtual/workqueue/cpumask sysfs file, or
 +                        by using the 'domain' flag described below.
 +
 +                        NOTE: by default the global workqueue runs on all CPUs,
 +                        so to protect individual CPUs the 'cpumask' file has to
 +                        be configured manually after bootup.
 +
                        domain
                          Isolate from the general SMP balancing and scheduling
                          algorithms. Note that performing domain isolation this way
                        The memory region may be marked as e820 type 12 (0xc)
                        and is NVDIMM or ADR memory.
  
 +      memmap=<size>%<offset>-<oldtype>+<newtype>
 +                      [KNL,ACPI] Convert memory within the specified region
 +                      from <oldtype> to <newtype>. If "-<oldtype>" is left
 +                      out, the whole region will be marked as <newtype>,
 +                      even if previously unavailable. If "+<newtype>" is left
 +                      out, matching memory will be removed. Types are
 +                      specified as e820 types, e.g., 1 = RAM, 2 = reserved,
 +                      3 = ACPI, 12 = PRAM.
 +
        memory_corruption_check=0/1 [X86]
                        Some BIOSes seem to corrupt the first 64k of
                        memory when doing things like suspend/resume.
                        This is useful when you use a panic=... timeout and
                        need the box quickly up again.
  
 +                      These settings can be accessed at runtime via
 +                      the nmi_watchdog and hardlockup_panic sysctls.
 +
        netpoll.carrier_timeout=
                        [NET] Specifies amount of time (in seconds) that
                        netpoll should wait for a carrier. By default netpoll
        norandmaps      Don't use address space randomization.  Equivalent to
                        echo 0 > /proc/sys/kernel/randomize_va_space
  
 -      noreplace-paravirt      [X86,IA-64,PV_OPS] Don't patch paravirt_ops
 -
        noreplace-smp   [X86-32,SMP] Don't replace SMP instructions
                        with UP alternatives
  
                        [KNL, SMP] Set scheduler's default relax_domain_level.
                        See Documentation/cgroup-v1/cpusets.txt.
  
 -      reserve=        [KNL,BUGS] Force the kernel to ignore some iomem area
 +      reserve=        [KNL,BUGS] Force kernel to ignore I/O ports or memory
 +                      Format: <base1>,<size1>[,<base2>,<size2>,...]
 +                      Reserve I/O ports or memory so the kernel won't use
 +                      them.  If <base> is less than 0x10000, the region
 +                      is assumed to be I/O ports; otherwise it is memory.
  
        reservetop=     [X86-32]
                        Format: nn[KMG]
  
        usbcore.nousb   [USB] Disable the USB subsystem
  
 +      usbcore.quirks=
 +                      [USB] A list of quirk entries to augment the built-in
 +                      usb core quirk list. List entries are separated by
 +                      commas. Each entry has the form
 +                      VendorID:ProductID:Flags. The IDs are 4-digit hex
 +                      numbers and Flags is a set of letters. Each letter
 +                      will change the built-in quirk; setting it if it is
 +                      clear and clearing it if it is set. The letters have
 +                      the following meanings:
 +                              a = USB_QUIRK_STRING_FETCH_255 (string
 +                                      descriptors must not be fetched using
 +                                      a 255-byte read);
 +                              b = USB_QUIRK_RESET_RESUME (device can't resume
 +                                      correctly so reset it instead);
 +                              c = USB_QUIRK_NO_SET_INTF (device can't handle
 +                                      Set-Interface requests);
 +                              d = USB_QUIRK_CONFIG_INTF_STRINGS (device can't
 +                                      handle its Configuration or Interface
 +                                      strings);
 +                              e = USB_QUIRK_RESET (device can't be reset
 +                                      (e.g morph devices), don't use reset);
 +                              f = USB_QUIRK_HONOR_BNUMINTERFACES (device has
 +                                      more interface descriptions than the
 +                                      bNumInterfaces count, and can't handle
 +                                      talking to these interfaces);
 +                              g = USB_QUIRK_DELAY_INIT (device needs a pause
 +                                      during initialization, after we read
 +                                      the device descriptor);
 +                              h = USB_QUIRK_LINEAR_UFRAME_INTR_BINTERVAL (For
 +                                      high speed and super speed interrupt
 +                                      endpoints, the USB 2.0 and USB 3.0 spec
 +                                      require the interval in microframes (1
 +                                      microframe = 125 microseconds) to be
 +                                      calculated as interval = 2 ^
 +                                      (bInterval-1).
 +                                      Devices with this quirk report their
 +                                      bInterval as the result of this
 +                                      calculation instead of the exponent
 +                                      variable used in the calculation);
 +                              i = USB_QUIRK_DEVICE_QUALIFIER (device can't
 +                                      handle device_qualifier descriptor
 +                                      requests);
 +                              j = USB_QUIRK_IGNORE_REMOTE_WAKEUP (device
 +                                      generates spurious wakeup, ignore
 +                                      remote wakeup capability);
 +                              k = USB_QUIRK_NO_LPM (device can't handle Link
 +                                      Power Management);
 +                              l = USB_QUIRK_LINEAR_FRAME_INTR_BINTERVAL
 +                                      (Device reports its bInterval as linear
 +                                      frames instead of the USB 2.0
 +                                      calculation);
 +                              m = USB_QUIRK_DISCONNECT_SUSPEND (Device needs
 +                                      to be disconnected before suspend to
 +                                      prevent spurious wakeup);
 +                              n = USB_QUIRK_DELAY_CTRL_MSG (Device needs a
 +                                      pause after every control message);
 +                      Example: quirks=0781:5580:bk,0a5c:5834:gij
 +
        usbhid.mousepoll=
                        [USBHID] The interval which mice are to be polled at.
  
        usbhid.jspoll=
                        [USBHID] The interval which joysticks are to be polled at.
  
+       usbhid.kbpoll=
+                       [USBHID] The interval which keyboards are to be polled at.
        usb-storage.delay_use=
                        [UMS] The delay in seconds before a new device is
                        scanned for Logical Units (default 1).
diff --combined drivers/hid/hid-ids.h
index 9454ac134ce22fee3658d210c4046dbe2d0c5626,77814cbe2d4c840e988fd45fb651cb050fd9ba4a..5a3a7ead301214dceb5cbe99308a08160515ae89
  #define USB_DEVICE_ID_CORSAIR_K70RGB    0x1b13
  #define USB_DEVICE_ID_CORSAIR_STRAFE    0x1b15
  #define USB_DEVICE_ID_CORSAIR_K65RGB    0x1b17
+ #define USB_DEVICE_ID_CORSAIR_GLAIVE_RGB        0x1b34
  #define USB_DEVICE_ID_CORSAIR_K70RGB_RAPIDFIRE  0x1b38
  #define USB_DEVICE_ID_CORSAIR_K65RGB_RAPIDFIRE  0x1b39
  #define USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB  0x1b3e
  #define USB_DEVICE_ID_DWAV_EGALAX_MULTITOUCH_A001     0xa001
  
  #define USB_VENDOR_ID_ELAN            0x04f3
+ #define USB_DEVICE_ID_HP_X2_10_COVER  0x0755
  
  #define USB_VENDOR_ID_ELECOM          0x056e
  #define USB_DEVICE_ID_ELECOM_BM084    0x0061
- #define USB_DEVICE_ID_ELECOM_EX_G_WIRED       0x00fb
- #define USB_DEVICE_ID_ELECOM_EX_G_WIRELESS    0x00fc
- #define USB_DEVICE_ID_ELECOM_DEFT_WIRED       0x00fe
- #define USB_DEVICE_ID_ELECOM_DEFT_WIRELESS    0x00ff
- #define USB_DEVICE_ID_ELECOM_HUGE_WIRED       0x010c
- #define USB_DEVICE_ID_ELECOM_HUGE_WIRELESS    0x010d
+ #define USB_DEVICE_ID_ELECOM_M_XT3URBK        0x00fb
+ #define USB_DEVICE_ID_ELECOM_M_XT3DRBK        0x00fc
+ #define USB_DEVICE_ID_ELECOM_M_XT4DRBK        0x00fd
+ #define USB_DEVICE_ID_ELECOM_M_DT1URBK        0x00fe
+ #define USB_DEVICE_ID_ELECOM_M_DT1DRBK        0x00ff
+ #define USB_DEVICE_ID_ELECOM_M_HT1URBK        0x010c
+ #define USB_DEVICE_ID_ELECOM_M_HT1DRBK        0x010d
  
  #define USB_VENDOR_ID_DREAM_CHEEKY    0x1d34
  #define USB_DEVICE_ID_DREAM_CHEEKY_WN 0x0004
  #define USB_DEVICE_ID_GOODTOUCH_000f  0x000f
  
  #define USB_VENDOR_ID_GOOGLE          0x18d1
+ #define USB_DEVICE_ID_GOOGLE_HAMMER   0x5022
  #define USB_DEVICE_ID_GOOGLE_TOUCH_ROSE       0x5028
+ #define USB_DEVICE_ID_GOOGLE_STAFF    0x502b
+ #define USB_DEVICE_ID_GOOGLE_WAND     0x502d
  
  #define USB_VENDOR_ID_GOTOP           0x08f2
  #define USB_DEVICE_ID_SUPER_Q2                0x007f
  #define USB_DEVICE_ID_LD_MICROCASSYTIME               0x1033
  #define USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE        0x1035
  #define USB_DEVICE_ID_LD_MICROCASSYPH         0x1038
 +#define USB_DEVICE_ID_LD_POWERANALYSERCASSY   0x1040
 +#define USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY     0x1042
 +#define USB_DEVICE_ID_LD_MACHINETESTCASSY     0x1043
  #define USB_DEVICE_ID_LD_JWM          0x1080
  #define USB_DEVICE_ID_LD_DMMP         0x1081
  #define USB_DEVICE_ID_LD_UMIP         0x1090
  
  #define USB_VENDOR_ID_SMK             0x0609
  #define USB_DEVICE_ID_SMK_PS3_BDREMOTE        0x0306
+ #define USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE       0x0368
+ #define USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE       0x0369
  
  #define USB_VENDOR_ID_SONY                    0x054c
  #define USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE     0x024b
diff --combined drivers/hid/hid-quirks.c
index e92b77fa574a940439ec8059265ba440dc91b993,c691d332f549344c4180dd84d3fc030f042e5ecd..587e2681a53f27256d3527cdfa6776d77944f52f
@@@ -62,6 -62,7 +62,7 @@@ static const struct hid_device_id hid_q
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K70R), HID_QUIRK_NO_INIT_REPORTS },
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K95RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_M65RGB), HID_QUIRK_NO_INIT_REPORTS },
+       { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_GLAIVE_RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_STRAFE), HID_QUIRK_NO_INIT_REPORTS | HID_QUIRK_ALWAYS_POLL },
        { HID_USB_DEVICE(USB_VENDOR_ID_CREATIVELABS, USB_DEVICE_ID_CREATIVE_SB_OMNI_SURROUND_51), HID_QUIRK_NOGET },
@@@ -317,6 -318,7 +318,7 @@@ static const struct hid_device_id hid_h
  #endif
  #if IS_ENABLED(CONFIG_HID_CORSAIR)
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_K90) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_GLAIVE_RGB) },
        { HID_USB_DEVICE(USB_VENDOR_ID_CORSAIR, USB_DEVICE_ID_CORSAIR_SCIMITAR_PRO_RGB) },
  #endif
  #if IS_ENABLED(CONFIG_HID_CP2112)
        { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0006) },
        { HID_USB_DEVICE(USB_VENDOR_ID_DRAGONRISE, 0x0011) },
  #endif
+ #if IS_ENABLED(CONFIG_HID_ELAN)
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_HP_X2_10_COVER) },
+ #endif
  #if IS_ENABLED(CONFIG_HID_ELECOM)
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_BM084) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_EX_G_WIRED) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_EX_G_WIRELESS) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRED) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_DEFT_WIRELESS) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRED) },
-       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_HUGE_WIRELESS) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3URBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT3DRBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_XT4DRBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1URBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_DT1DRBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1URBK) },
+       { HID_USB_DEVICE(USB_VENDOR_ID_ELECOM, USB_DEVICE_ID_ELECOM_M_HT1DRBK) },
  #endif
  #if IS_ENABLED(CONFIG_HID_ELO)
        { HID_USB_DEVICE(USB_VENDOR_ID_ELO, 0x0009) },
  #if IS_ENABLED(CONFIG_HID_SONY)
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) },
        { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_PS3_BDREMOTE) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR5U_REMOTE) },
+       { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SMK, USB_DEVICE_ID_SMK_NSG_MR7U_REMOTE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_BUZZ_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_WIRELESS_BUZZ_CONTROLLER) },
        { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_MOTION_CONTROLLER) },
@@@ -809,9 -817,6 +817,9 @@@ static const struct hid_device_id hid_i
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTIME) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYTEMPERATURE) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MICROCASSYPH) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_POWERANALYSERCASSY) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_CONVERTERCONTROLLERCASSY) },
 +      { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_MACHINETESTCASSY) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_JWM) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_DMMP) },
        { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_UMIP) },
diff --combined drivers/hid/uhid.c
index 4e0e7baf85136d28573745d40e457e8de94e34cb,39b60e53118339b37908e4bb034ff90e89eaa128..3c55073136064263c0b1175cbcce60acd81d34ba
@@@ -496,12 -496,12 +496,12 @@@ static int uhid_dev_create2(struct uhid
                goto err_free;
        }
  
-       len = min(sizeof(hid->name), sizeof(ev->u.create2.name)) - 1;
-       strncpy(hid->name, ev->u.create2.name, len);
-       len = min(sizeof(hid->phys), sizeof(ev->u.create2.phys)) - 1;
-       strncpy(hid->phys, ev->u.create2.phys, len);
-       len = min(sizeof(hid->uniq), sizeof(ev->u.create2.uniq)) - 1;
-       strncpy(hid->uniq, ev->u.create2.uniq, len);
+       len = min(sizeof(hid->name), sizeof(ev->u.create2.name));
+       strlcpy(hid->name, ev->u.create2.name, len);
+       len = min(sizeof(hid->phys), sizeof(ev->u.create2.phys));
+       strlcpy(hid->phys, ev->u.create2.phys, len);
+       len = min(sizeof(hid->uniq), sizeof(ev->u.create2.uniq));
+       strlcpy(hid->uniq, ev->u.create2.uniq, len);
  
        hid->ll_driver = &uhid_hid_driver;
        hid->bus = ev->u.create2.bus;
@@@ -760,7 -760,7 +760,7 @@@ static __poll_t uhid_char_poll(struct f
        poll_wait(file, &uhid->waitq, wait);
  
        if (uhid->head != uhid->tail)
 -              return POLLIN | POLLRDNORM;
 +              return EPOLLIN | EPOLLRDNORM;
  
        return 0;
  }