Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1319690
| From | Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 4.3 149/157] HID: wacom: Expect touch_max touches if HID_DG_CONTACTCOUNT not present |
| Date | 2016-01-27 21:30 +0100 |
| Message-ID | <qVET3-FR-61@gated-at.bofh.it> (permalink) |
| References | <qVCRc-7CM-17@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
4.3-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason Gerecke <killertofu@gmail.com>
commit df7079380554e6e8e13a0812c7e6c72f669aba5c upstream.
When introduced in commit 1b5d514, the check 'if (hid_data->cc_index >= 0)'
in 'wacom_wac_finger_pre_report' was intended to switch where the driver
got the expected number of contacts from: HID_DG_CONTACTCOUNT if the usage
was present, or 'touch_max' otherwise. Unfortunately, an oversight worthy
of a brown paper bag (specifically, that 'cc_index' could never be negative)
meant that the latter 'else' clause would never be entered.
The patch prior to this one introduced a way for 'cc_index' to be negative,
but only if HID_DG_CONTACTCOUNT is present in some report _other_ than the
one being processed. To ensure the 'else' clause is also entered for devices
which don't have HID_DG_CONTACTCOUNT on _any_ report, we add the additional
constraint that 'cc_report' be non-zero (which is true only if the usage is
present in some report).
Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hid/wacom_wac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/hid/wacom_wac.c
+++ b/drivers/hid/wacom_wac.c
@@ -1740,8 +1740,8 @@ static void wacom_wac_finger_pre_report(
}
}
}
-
- if (hid_data->cc_index >= 0) {
+ if (hid_data->cc_report != 0 &&
+ hid_data->cc_index >= 0) {
struct hid_field *field = report->field[hid_data->cc_index];
int value = field->value[hid_data->cc_value_index];
if (value)
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 4.3 000/157] 4.3.5-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
[PATCH 4.3 001/157] x86 smpboot: Re-enable init_udelay=0 by default on modern CPUs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
Re: [PATCH 4.3 001/157] x86 smpboot: Re-enable init_udelay=0 by default on modern CPUs Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 23:30 +0100
Re: [PATCH 4.3 001/157] x86 smpboot: Re-enable init_udelay=0 by default on modern CPUs Donald Parsons <dparsons@brightdsl.net> - 2016-01-27 23:30 +0100
[PATCH 4.3 052/157] ALSA: seq: Fix race at timer setup and close Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
[PATCH 4.3 046/157] ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
[PATCH 4.3 010/157] KVM: svm: unconditionally intercept #DB Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
[PATCH 4.3 155/157] mn10300: Select CONFIG_HAVE_UID16 to fix build failure Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 20:10 +0100
[PATCH 4.3 154/157] fix the regression from "direct-io: Fix negative return from dio read beyond eof" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:20 +0100
[PATCH 4.3 126/157] powerpc/opal-irqchip: Fix deadlock introduced by "Fix double endian conversion" Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:20 +0100
[PATCH 4.3 135/157] arm64: cmpxchg_dbl: fix return value type Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:20 +0100
[PATCH 4.3 134/157] arm64: bpf: fix mod-by-zero case Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:20 +0100
[PATCH 4.3 044/157] ALSA: hda - Set SKL+ hda controller power at freeze() and thaw() Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 128/157] powerpc: Make value-returning atomics fully ordered Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 157/157] arm64: KVM: Add workaround for Cortex-A57 erratum 834220 Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 131/157] powerpc/module: Handle R_PPC64_ENTRY relocations Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 129/157] powerpc: Make {cmp}xchg* and their atomic_ versions fully ordered Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 133/157] arm64: bpf: fix div-by-zero case Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 156/157] arm64: restore bogomips information in /proc/cpuinfo Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 147/157] parisc iommu: fix panic due to trying to allocate too large region Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 132/157] recordmcount: arm64: Replace the ignored mcount call into nop Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 148/157] HID: wacom: Tie cached HID_DG_CONTACTCOUNT indices to report ID Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 150/157] HID: core: Avoid uninitialized buffer access Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 149/157] HID: wacom: Expect touch_max touches if HID_DG_CONTACTCOUNT not present Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 130/157] scripts/recordmcount.pl: support data in text section on powerpc Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
[PATCH 4.3 153/157] direct-io: Fix negative return from dio read beyond eof Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-01-27 21:30 +0100
Re: [PATCH 4.3 000/157] 4.3.5-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2016-01-28 00:30 +0100
Re: [PATCH 4.3 000/157] 4.3.5-stable review Guenter Roeck <linux@roeck-us.net> - 2016-01-28 03:20 +0100
csiph-web