summaryrefslogtreecommitdiff
path: root/drivers/input/mouse/synaptics.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2017-03-24 21:20:38 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-04-04 02:23:58 +0300
commitf6c4442bfa0812efbb5d54db01a17a7ba0fc9298 (patch)
treebdc1cd57839bd168d54b8dddb0fc0f9820391892 /drivers/input/mouse/synaptics.h
parent212baf03a30a8fb29ab5f69726bb920ebe3d44a1 (diff)
downloadlinux-f6c4442bfa0812efbb5d54db01a17a7ba0fc9298.tar.xz
Input: synaptics - use u8 instead of unsigned char
The rest of the kernel uses u8, u16, etc for data coming form hardware, let's switch ti using u8 here as well. Also turn pkt_type into an enum. Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/mouse/synaptics.h')
-rw-r--r--drivers/input/mouse/synaptics.h22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h
index 7a998fbfa6b0..fc00e005c611 100644
--- a/drivers/input/mouse/synaptics.h
+++ b/drivers/input/mouse/synaptics.h
@@ -137,15 +137,17 @@
#define SYN_PS_SET_MODE2 0x14
#define SYN_PS_CLIENT_CMD 0x28
-/* synaptics packet types */
-#define SYN_NEWABS 0
-#define SYN_NEWABS_STRICT 1
-#define SYN_NEWABS_RELAXED 2
-#define SYN_OLDABS 3
-
/* amount to fuzz position data when touchpad reports reduced filtering */
#define SYN_REDUCED_FILTER_FUZZ 8
+/* synaptics packet types */
+enum synaptics_pkt_type {
+ SYN_NEWABS,
+ SYN_NEWABS_STRICT,
+ SYN_NEWABS_RELAXED,
+ SYN_OLDABS,
+};
+
/*
* A structure to describe the state of the touchpad hardware (buttons and pad)
*/
@@ -159,8 +161,8 @@ struct synaptics_hw_state {
unsigned int middle:1;
unsigned int up:1;
unsigned int down:1;
- unsigned char ext_buttons;
- signed char scroll;
+ u8 ext_buttons;
+ s8 scroll;
};
/* Data read from the touchpad */
@@ -181,8 +183,8 @@ struct synaptics_device_info {
struct synaptics_data {
struct synaptics_device_info info;
- unsigned char pkt_type; /* packet type - old, new, etc */
- unsigned char mode; /* current mode byte */
+ enum synaptics_pkt_type pkt_type; /* packet type - old, new, etc */
+ u8 mode; /* current mode byte */
int scroll;
bool absolute_mode; /* run in Absolute mode */