aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/uhid.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-04-05 11:53:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-04-05 11:53:34 -0700
commite8403b493fd5180e351ca67eb66406d95dadcd0b (patch)
treee413c0017a861a2f74e54a3084140b5a9f1100ec /drivers/hid/uhid.c
parente02d37bf55a9a36f22427fd6dd733fe104d817b6 (diff)
parent9931753b6c5ebf78ad0b8cb056234369f0b3c561 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
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 ...
Diffstat (limited to 'drivers/hid/uhid.c')
-rw-r--r--drivers/hid/uhid.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/hid/uhid.c b/drivers/hid/uhid.c
index 4e0e7baf8513..3c5507313606 100644
--- a/drivers/hid/uhid.c
+++ b/drivers/hid/uhid.c
@@ -496,12 +496,12 @@ static int uhid_dev_create2(struct uhid_device *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;