diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2019-06-25 08:42:25 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-06-25 08:42:25 -0500 |
commit | d7929c1e13e3788e7cb741d75b5baec5e53eff21 (patch) | |
tree | cf513071edfc4499b4e025e4846244c9d0e4c6bd /drivers/hid/hid-multitouch.c | |
parent | drm/amdgpu: disable gfxoff on navi10 (diff) | |
parent | drm/edid: use for_each_displayid_db where applicable (diff) | |
download | linux-dev-d7929c1e13e3788e7cb741d75b5baec5e53eff21.tar.xz linux-dev-d7929c1e13e3788e7cb741d75b5baec5e53eff21.zip |
Merge branch 'drm-next' into drm-next-5.3
Backmerge drm-next and fix up conflicts due to drmP.h removal.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/hid/hid-multitouch.c')
-rw-r--r-- | drivers/hid/hid-multitouch.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/hid/hid-multitouch.c b/drivers/hid/hid-multitouch.c index c02d4cad1893..5df5dd56ecc8 100644 --- a/drivers/hid/hid-multitouch.c +++ b/drivers/hid/hid-multitouch.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later /* * HID driver for multitouch panels * @@ -17,14 +18,9 @@ * Copyright (c) 2009-2010 Stephane Chatty <chatty@enac.fr> * Copyright (c) 2010 Henrik Rydberg <rydberg@euromail.se> * Copyright (c) 2010 Canonical, Ltd. - * */ /* - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the Free - * Software Foundation; either version 2 of the License, or (at your option) - * any later version. */ /* @@ -641,6 +637,13 @@ static void mt_store_field(struct hid_device *hdev, if (*target != DEFAULT_TRUE && *target != DEFAULT_FALSE && *target != DEFAULT_ZERO) { + if (usage->contactid == DEFAULT_ZERO || + usage->x == DEFAULT_ZERO || + usage->y == DEFAULT_ZERO) { + hid_dbg(hdev, + "ignoring duplicate usage on incomplete"); + return; + } usage = mt_allocate_usage(hdev, application); if (!usage) return; |