Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1372384
| From | zengzhaoxiu@163.com |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v2 29/30] input: use parity8 in elantech |
| Date | 2016-04-06 12:30 +0200 |
| Message-ID | <rkSSL-2lx-29@gated-at.bofh.it> (permalink) |
| References | <rkoUH-4m4-33@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
Remove even parity table, use parity8 instead.
Signed-off-by: Zhaoxiu Zeng <zhaoxiu.zeng@gmail.com>
---
drivers/input/mouse/elantech.c | 10 +++-------
drivers/input/mouse/elantech.h | 1 -
2 files changed, 3 insertions(+), 8 deletions(-)
diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c
index 78f93cf..bbb4aa6 100644
--- a/drivers/input/mouse/elantech.c
+++ b/drivers/input/mouse/elantech.c
@@ -693,9 +693,9 @@ static int elantech_packet_check_v1(struct psmouse *psmouse)
p3 = (packet[0] & 0x04) >> 2;
- return etd->parity[packet[1]] == p1 &&
- etd->parity[packet[2]] == p2 &&
- etd->parity[packet[3]] == p3;
+ return parity8(packet[1]) != p1 &&
+ parity8(packet[2]) != p2 &&
+ parity8(packet[3]) != p3;
}
static int elantech_debounce_check_v2(struct psmouse *psmouse)
@@ -1635,10 +1635,6 @@ int elantech_init(struct psmouse *psmouse)
psmouse_reset(psmouse);
- etd->parity[0] = 1;
- for (i = 1; i < 256; i++)
- etd->parity[i] = etd->parity[i & (i - 1)] ^ 1;
-
/*
* Do the version query again so we can store the result
*/
diff --git a/drivers/input/mouse/elantech.h b/drivers/input/mouse/elantech.h
index e1cbf40..542c5d9 100644
--- a/drivers/input/mouse/elantech.h
+++ b/drivers/input/mouse/elantech.h
@@ -141,7 +141,6 @@ struct elantech_data {
unsigned int y_max;
unsigned int width;
struct finger_pos mt[ETP_MAX_FINGERS];
- unsigned char parity[256];
int (*send_cmd)(struct psmouse *psmouse, unsigned char c, unsigned char *param);
void (*original_set_rate)(struct psmouse *psmouse, unsigned int rate);
};
--
2.5.0
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH V2 01/30] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-05 04:30 +0200
[PATCH V2 02/30] Include generic parity.h in some architectures' bitops.h Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-05 06:30 +0200
[PATCH v2 02/30] Include generic parity.h in some architectures' bitops.h zengzhaoxiu@163.com - 2016-04-06 10:50 +0200
Re: [PATCH V2 01/30] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-04-05 21:10 +0200
Re: [PATCH V2 01/30] bitops: add parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-06 07:40 +0200
Re: [PATCH V2 01/30] bitops: add parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-04-06 10:30 +0200
[PATCH v2 01/30] bitops: add parity functions zengzhaoxiu@163.com - 2016-04-06 10:50 +0200
[PATCH v2 03/30] Add alpha-specific parity functions zengzhaoxiu@163.com - 2016-04-06 10:50 +0200
[PATCH v2 05/30] Add ia64-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:00 +0200
[PATCH v2 07/30] Add powerpc-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:10 +0200
[PATCH v2 06/30] Add mips-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:10 +0200
[PATCH v2 06/30] Add mips-specific parity functions zengzhaoxiu@163.com - 2016-04-06 12:30 +0200
[PATCH v2 04/30] Add blackfin-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:10 +0200
[PATCH v2 09/30] Add tile-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:10 +0200
Re: [PATCH v2 09/30] Add tile-specific parity functions Chris Metcalf <cmetcalf@mellanox.com> - 2016-04-06 15:30 +0200
Re: [PATCH v2 09/30] Add tile-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-07 06:00 +0200
[PATCH v2 08/30] Add sparc-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:20 +0200
Re: [PATCH v2 08/30] Add sparc-specific parity functions Sam Ravnborg <sam@ravnborg.org> - 2016-04-06 20:50 +0200
Re: [PATCH v2 08/30] Add sparc-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-07 06:00 +0200
[PATCH v2 10/30] Add x86-specific parity functions zengzhaoxiu@163.com - 2016-04-06 11:30 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-06 12:20 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-06 12:40 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-06 13:00 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-07 06:00 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-07 11:50 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-11 04:50 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-15 02:20 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-07 06:00 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-07 11:50 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Andi Kleen <andi@firstfloor.org> - 2016-04-06 21:50 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Zeng Zhaoxiu <zhaoxiu.zeng@gmail.com> - 2016-04-07 06:00 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Dmitry Vyukov <dvyukov@google.com> - 2016-04-07 08:40 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions Borislav Petkov <bp@suse.de> - 2016-04-07 11:50 +0200
Re: [PATCH v2 10/30] Add x86-specific parity functions One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk> - 2016-04-07 16:20 +0200
[PATCH v2 11/30] sunrpc: use parity8 zengzhaoxiu@163.com - 2016-04-06 11:40 +0200
[PATCH v2 12/30] mips: use parity functions in cerr-sb1.c zengzhaoxiu@163.com - 2016-04-06 11:40 +0200
[PATCH v2 14/30] media: use parity8 in vivid-vbi-gen.c zengzhaoxiu@163.com - 2016-04-06 11:40 +0200
[PATCH v2 13/30] bch: use parity32 zengzhaoxiu@163.com - 2016-04-06 11:40 +0200
[PATCH v2 17/30] input: use parity64 in sidewinder zengzhaoxiu@163.com - 2016-04-06 11:50 +0200
[PATCH v2 16/30] input: use parity32 in grip_mp zengzhaoxiu@163.com - 2016-04-06 11:50 +0200
[PATCH v2 18/30] input: use parity16 in ams_delta_serio zengzhaoxiu@163.com - 2016-04-06 11:50 +0200
[PATCH v2 19/30] scsi: use parity32 in isci's phy zengzhaoxiu@163.com - 2016-04-06 11:50 +0200
[PATCH v2 15/30] media: use parity functions in saa7115 zengzhaoxiu@163.com - 2016-04-06 11:50 +0200
[PATCH v2 22/30] crypto: use parity functions in qat_hal zengzhaoxiu@163.com - 2016-04-06 12:00 +0200
[PATCH v2 21/30] mtd: use parity functions in inftlcore zengzhaoxiu@163.com - 2016-04-06 12:00 +0200
[PATCH v2 20/30] mtd: use parity16 in ssfdc zengzhaoxiu@163.com - 2016-04-06 12:00 +0200
[PATCH v2 23/30] mtd: use parity16 in sm_ftl zengzhaoxiu@163.com - 2016-04-06 12:10 +0200
[PATCH v2 26/30] input: use parity8 in sa1111ps2 zengzhaoxiu@163.com - 2016-04-06 12:20 +0200
[PATCH v2 27/30] iio: use parity32 in adxrs450 zengzhaoxiu@163.com - 2016-04-06 12:20 +0200
Re: [PATCH v2 27/30] iio: use parity32 in adxrs450 Jonathan Cameron <jic23@kernel.org> - 2016-04-10 16:40 +0200
Re: [PATCH v2 27/30] iio: use parity32 in adxrs450 Lars-Peter Clausen <lars@metafoo.de> - 2016-04-10 17:10 +0200
Re: [PATCH v2 27/30] iio: use parity32 in adxrs450 Jonathan Cameron <jic23@kernel.org> - 2016-04-10 17:20 +0200
Re: [PATCH v2 27/30] iio: use parity32 in adxrs450 Jonathan Cameron <jic23@kernel.org> - 2016-04-10 17:20 +0200
[PATCH v2 24/30] ethernet: use parity8 in sun/niu.c zengzhaoxiu@163.com - 2016-04-06 12:20 +0200
[PATCH v2 25/30] input: use parity8 in pcips2 zengzhaoxiu@163.com - 2016-04-06 12:20 +0200
Re: [PATCH v2 28/30] serial: use parity32 in max3100 Greg KH <gregkh@linuxfoundation.org> - 2016-04-06 12:30 +0200
[PATCH v2 28/30] serial: use parity32 in max3100 zengzhaoxiu@163.com - 2016-04-06 12:30 +0200
[PATCH v2 30/30] ethernet: use parity8 in broadcom/tg3.c zengzhaoxiu@163.com - 2016-04-06 12:30 +0200
[PATCH v2 29/30] input: use parity8 in elantech zengzhaoxiu@163.com - 2016-04-06 12:30 +0200
csiph-web